SDL_GL_SetAttribute man page on Syllable

Man page or keyword search:  
man Server   2339 pages
apropos Keyword Search (all sections)
Output format
Syllable logo
[printable version]

SDL_GL_SetAttribute(3)	       SDL API Reference	SDL_GL_SetAttribute(3)

NAME
       SDL_GL_SetAttribute - Set a special SDL/OpenGL attribute

SYNOPSIS
       #include "SDL.h"

       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, "Couldn't set GL mode: %s
       ", SDL_GetError());
	 SDL_Quit();
	 return;
       }

	      Note:

	      The  SDL_DOUBLEBUF flag is not required to enable double buffer‐
	      ing 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

SDL			    Tue 11 Sep 2001, 23:01	SDL_GL_SetAttribute(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Syllable

List of man pages available for Syllable

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net