Query: sdl_gl_setattribute
OS: opensolaris
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
SDL_GL_SetAttribute(3) SDL API Reference SDL_GL_SetAttribute(3)NAMESDL_GL_SetAttribute - Set a special SDL/OpenGL attributeSYNOPSIS#include "SDL.h" int SDL_GL_SetAttribute(SDL_GLattr attr, int value);DESCRIPTIONSets 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 VALUEReturns 0 on success, or -1 on error.EXAMPLESDL_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, "Couldn't set GL mode: %s ", SDL_GetError()); SDL_Quit(); return; } 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 ALSOSDL_GL_GetAttribute, GL AttributesSDLTue 11 Sep 2001, 23:01 SDL_GL_SetAttribute(3)
| Related Man Pages |
|---|
| sdl_setpalette(3) - opensolaris |
| sdl_setvideomode(3) - redhat |
| sdl_setpalette(3) - redhat |
| sdl_setcolors(3) - debian |
| sdl_setcolors(3) - centos |
| Similar Topics in the Unix Linux Community |
|---|
| Trying to block signal |
| solaris zones vs container.. |
| Change directory for core file |
| Free Sun Blade 2k, Ultra 2, Ross Hyperstation 30, cards, memory- Baltimore, MD |
| Shopt -s histappend |