Penguin

SDL_GL_!SetAttribute?

SDL_GL_!SetAttribute?

NAME SYNOPSIS DESCRIPTION RETURN VALUE EXAMPLE SEE ALSO


NAME

SDL_GL_!SetAttribute?- Set a special SDL/OpenGL attribute

SYNOPSIS

#include

int SDL_GL_!SetAttribute?(SDL_GLattr attr, int value);

DESCRIPTION

Sets the OpenGL attribute attr to value. The attributes you set don't take effect until after a call to SDL_!SetVideoMode?. You should use SDL_GL_!GetAttribute? to check the values after a SDL_!SetVideoMode? call.

RETURN VALUE

Returns 0 on success, or -1 on error.

EXAMPLE

SDL_GL_!SetAttribute?( SDL_GL_RED_SIZE, 5 ); SDL_GL_!SetAttribute?( SDL_GL_GREEN_SIZE, 5 ); SDL_GL_!SetAttribute?( SDL_GL_BLUE_SIZE, 5 ); SDL_GL_!SetAttribute?( SDL_GL_DEPTH_SIZE, 16 ); SDL_GL_!SetAttribute?( SDL_GL_DOUBLEBUFFER, 1 ); if ( (screen=SDL_!SetVideoMode?( 640, 480, 16, SDL_OPENGL )) == NULL ) { fprintf(stderr,

Note:

The SDL_DOUBLEBUF flag is not required to enable double buffering when setting an OpenGL video mode. Double buffering is enabled or disabled using the SDL_GL_DOUBLEBUFFER attribute.

SEE ALSO

SDL_GL_!GetAttribute?, GL Attributes


This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

lib/main.php:944: Notice: PageInfo: Cannot find action page

lib/main.php:839: Notice: PageInfo: Unknown action