Method SDL.gl_get_attribute()


Method gl_get_attribute

int gl_get_attribute(int attribute)

Description

Returns the value of the given SDL/OpenGL attribute. You might want to call this after SDL.set_video_mode() to check that attributes have been set as you expected.

Parameter attribute

The SDL/OpenGL attribute to query.

Returns

The value of the given attribute.

Example
// Has double-buffering been set?
    int db = SDL.gl_get_attribute( SDL.GL_DOUBLEBUFFER );
    if ( db )
    {
      // yes...