Penguin
Blame: SDL_GL_SetAttribute(3)
EditPageHistoryDiffInfoLikePages
Annotated edit history of SDL_GL_SetAttribute(3) version 2 showing authors affecting page license. View with all changes included.
Rev Author # Line
1 perry 1 SDL_GL_!SetAttribute
2 !!!SDL_GL_!SetAttribute
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 EXAMPLE
8 SEE ALSO
9 ----
10 !!NAME
11
12
13 SDL_GL_!SetAttribute- Set a special SDL/OpenGL attribute
14 !!SYNOPSIS
15
16
17 __#include __
18
19
20 __int SDL_GL_!SetAttribute__(__SDL_GLattr attr, int
21 value__);
22 !!DESCRIPTION
23
24
25 Sets the OpenGL ''attribute'' __attr__ to
26 __value__. The attributes you set don't take effect until
27 after a call to __SDL_!SetVideoMode__. You should use
28 __SDL_GL_!GetAttribute__ to check the values after a
29 __SDL_!SetVideoMode__ call.
30 !!RETURN VALUE
31
32
33 Returns __0__ on success, or __-1__ on
34 error.
35 !!EXAMPLE
36
37
38 SDL_GL_!SetAttribute( SDL_GL_RED_SIZE, 5 );
39 SDL_GL_!SetAttribute( SDL_GL_GREEN_SIZE, 5 );
40 SDL_GL_!SetAttribute( SDL_GL_BLUE_SIZE, 5 );
41 SDL_GL_!SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
42 SDL_GL_!SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
43 if ( (screen=SDL_!SetVideoMode( 640, 480, 16, SDL_OPENGL )) == NULL ) {
44 fprintf(stderr,
45
46
47 __Note:__
48
49
50 The __SDL_DOUBLEBUF__ flag is not required to enable
51 double buffering when setting an OpenGL video mode. Double
52 buffering is enabled or disabled using the
53 SDL_GL_DOUBLEBUFFER attribute.
54 !!SEE ALSO
55
56
57 __SDL_GL_!GetAttribute__, ''GL
58 Attributes''
59 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.