Example #1
0
 /// <summary>
 /// Sets an OpenGL attribute
 /// </summary>
 /// <param name="attribute">The attribute to set</param>
 /// <param name="attributeValue">The new attribute value</param>
 public static void GLSetAttribute(OpenGLAttr attribute, int attributeValue)
 {
     if (Sdl.SDL_GL_SetAttribute((int)attribute, attributeValue) != 0)
     {
         throw SdlException.Generate();
     }
 }
Example #2
0
        /// <summary>
        /// Gets the value of an OpenGL attribute
        /// </summary>
        /// <param name="attribute">The attribute to get</param>
        /// <returns>The current attribute value</returns>
        public static int GLGetAttribute(OpenGLAttr attribute)
        {
            int returnValue;

            if (Sdl.SDL_GL_GetAttribute((int)attribute, out returnValue) != 0)
            {
                throw SdlException.Generate();
            }
            return(returnValue);
        }
Example #3
0
 /// <summary>
 /// Gets the value of an OpenGL attribute
 /// </summary>
 /// <param name="attribute">The attribute to get</param>
 /// <returns>The current attribute value</returns>
 public static int GLGetAttribute(OpenGLAttr attribute)
 {
     int returnValue;
     if (Sdl.SDL_GL_GetAttribute((int)attribute, out returnValue) != 0)
     {
         throw SdlException.Generate();
     }
     return returnValue;
 }
Example #4
0
 /// <summary>
 /// Sets an OpenGL attribute
 /// </summary>
 /// <param name="attribute">The attribute to set</param>
 /// <param name="attributeValue">The new attribute value</param>
 public static void GLSetAttribute(OpenGLAttr attribute, int attributeValue)
 {
     if (Sdl.SDL_GL_SetAttribute((int)attribute, attributeValue) != 0)
     {
         throw SdlException.Generate();
     }
 }