Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SDL_GL_SetAttribute(3)
Edit
PageHistory
Diff
Info
LikePages
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'' ----
One page links to
SDL_GL_SetAttribute(3)
:
SDLManPages
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.