Mercurial > sdl-ios-xcode
comparison docs/html/guidevideoopengl.html @ 803:355632dca928
Updated SDL HTML documentation
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 10 Feb 2004 15:15:40 +0000 |
parents | 55f1f1b3e27d |
children | f12379c41042 |
comparison
equal
deleted
inserted
replaced
802:3c609d54f100 | 803:355632dca928 |
---|---|
2 ><HEAD | 2 ><HEAD |
3 ><TITLE | 3 ><TITLE |
4 >Using OpenGL With SDL</TITLE | 4 >Using OpenGL With SDL</TITLE |
5 ><META | 5 ><META |
6 NAME="GENERATOR" | 6 NAME="GENERATOR" |
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 | 7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ |
8 "><LINK | 8 "><LINK |
9 REL="HOME" | 9 REL="HOME" |
10 TITLE="SDL Library Documentation" | 10 TITLE="SDL Library Documentation" |
11 HREF="index.html"><LINK | 11 HREF="index.html"><LINK |
12 REL="UP" | 12 REL="UP" |
26 VLINK="#551a8b" | 26 VLINK="#551a8b" |
27 ALINK="#ff0000" | 27 ALINK="#ff0000" |
28 ><DIV | 28 ><DIV |
29 CLASS="NAVHEADER" | 29 CLASS="NAVHEADER" |
30 ><TABLE | 30 ><TABLE |
31 SUMMARY="Header navigation table" | |
31 WIDTH="100%" | 32 WIDTH="100%" |
32 BORDER="0" | 33 BORDER="0" |
33 CELLPADDING="0" | 34 CELLPADDING="0" |
34 CELLSPACING="0" | 35 CELLSPACING="0" |
35 ><TR | 36 ><TR |
43 WIDTH="10%" | 44 WIDTH="10%" |
44 ALIGN="left" | 45 ALIGN="left" |
45 VALIGN="bottom" | 46 VALIGN="bottom" |
46 ><A | 47 ><A |
47 HREF="guidevideo.html" | 48 HREF="guidevideo.html" |
49 ACCESSKEY="P" | |
48 >Prev</A | 50 >Prev</A |
49 ></TD | 51 ></TD |
50 ><TD | 52 ><TD |
51 WIDTH="80%" | 53 WIDTH="80%" |
52 ALIGN="center" | 54 ALIGN="center" |
56 WIDTH="10%" | 58 WIDTH="10%" |
57 ALIGN="right" | 59 ALIGN="right" |
58 VALIGN="bottom" | 60 VALIGN="bottom" |
59 ><A | 61 ><A |
60 HREF="guideinput.html" | 62 HREF="guideinput.html" |
63 ACCESSKEY="N" | |
61 >Next</A | 64 >Next</A |
62 ></TD | 65 ></TD |
63 ></TR | 66 ></TR |
64 ></TABLE | 67 ></TABLE |
65 ><HR | 68 ><HR |
69 CLASS="SECT1" | 72 CLASS="SECT1" |
70 ><H1 | 73 ><H1 |
71 CLASS="SECT1" | 74 CLASS="SECT1" |
72 ><A | 75 ><A |
73 NAME="GUIDEVIDEOOPENGL" | 76 NAME="GUIDEVIDEOOPENGL" |
74 >Using OpenGL With SDL</A | 77 ></A |
75 ></H1 | 78 >Using OpenGL With SDL</H1 |
76 ><P | 79 ><P |
77 >SDL has the ability to create and use OpenGL contexts on several platforms(Linux/X11, Win32, BeOS, MacOS Classic/Toolbox, MacOS X, FreeBSD/X11 and Solaris/X11). This allows you to use SDL's audio, event handling, threads and times in your OpenGL applications (a function often performed by GLUT).</P | 80 >SDL has the ability to create and use OpenGL contexts on several platforms(Linux/X11, Win32, BeOS, MacOS Classic/Toolbox, MacOS X, FreeBSD/X11 and Solaris/X11). This allows you to use SDL's audio, event handling, threads and times in your OpenGL applications (a function often performed by GLUT).</P |
78 ><DIV | 81 ><DIV |
79 CLASS="SECT2" | 82 CLASS="SECT2" |
80 ><H2 | 83 ><H2 |
81 CLASS="SECT2" | 84 CLASS="SECT2" |
82 ><A | 85 ><A |
83 NAME="AEN103" | 86 NAME="AEN103" |
84 >Initialisation</A | 87 ></A |
85 ></H2 | 88 >Initialisation</H2 |
86 ><P | 89 ><P |
87 >Initialising SDL to use OpenGL is not very different to initialising SDL normally. There are three differences; you must pass <TT | 90 >Initialising SDL to use OpenGL is not very different to initialising SDL normally. There are three differences; you must pass <TT |
88 CLASS="LITERAL" | 91 CLASS="LITERAL" |
89 >SDL_OPENGL</TT | 92 >SDL_OPENGL</TT |
90 > to <A | 93 > to <A |
97 HREF="sdlglsetattribute.html" | 100 HREF="sdlglsetattribute.html" |
98 ><TT | 101 ><TT |
99 CLASS="FUNCTION" | 102 CLASS="FUNCTION" |
100 >SDL_GL_SetAttribute</TT | 103 >SDL_GL_SetAttribute</TT |
101 ></A | 104 ></A |
102 > and finally, if you wish to use double buffering you must specify it as a GL attribute, <I | 105 > and finally, if you wish to use double buffering you must specify it as a GL attribute, <SPAN |
106 CLASS="emphasis" | |
107 ><I | |
103 CLASS="EMPHASIS" | 108 CLASS="EMPHASIS" |
104 >not</I | 109 >not</I |
110 ></SPAN | |
105 > by passing the <TT | 111 > by passing the <TT |
106 CLASS="LITERAL" | 112 CLASS="LITERAL" |
107 >SDL_DOUBLEBUF</TT | 113 >SDL_DOUBLEBUF</TT |
108 > flag to <TT | 114 > flag to <TT |
109 CLASS="FUNCTION" | 115 CLASS="FUNCTION" |
214 CLASS="SECT2" | 220 CLASS="SECT2" |
215 ><H2 | 221 ><H2 |
216 CLASS="SECT2" | 222 CLASS="SECT2" |
217 ><A | 223 ><A |
218 NAME="AEN117" | 224 NAME="AEN117" |
219 >Drawing</A | 225 ></A |
220 ></H2 | 226 >Drawing</H2 |
221 ><P | 227 ><P |
222 >Apart from initialisation, using OpenGL within SDL is the same as using OpenGL | 228 >Apart from initialisation, using OpenGL within SDL is the same as using OpenGL |
223 with any other API, e.g. GLUT. You still use all the same function calls and | 229 with any other API, e.g. GLUT. You still use all the same function calls and |
224 data types. However if you are using a double-buffered display, then you must | 230 data types. However if you are using a double-buffered display, then you must |
225 use | 231 use |
660 ><DIV | 666 ><DIV |
661 CLASS="NAVFOOTER" | 667 CLASS="NAVFOOTER" |
662 ><HR | 668 ><HR |
663 ALIGN="LEFT" | 669 ALIGN="LEFT" |
664 WIDTH="100%"><TABLE | 670 WIDTH="100%"><TABLE |
671 SUMMARY="Footer navigation table" | |
665 WIDTH="100%" | 672 WIDTH="100%" |
666 BORDER="0" | 673 BORDER="0" |
667 CELLPADDING="0" | 674 CELLPADDING="0" |
668 CELLSPACING="0" | 675 CELLSPACING="0" |
669 ><TR | 676 ><TR |
671 WIDTH="33%" | 678 WIDTH="33%" |
672 ALIGN="left" | 679 ALIGN="left" |
673 VALIGN="top" | 680 VALIGN="top" |
674 ><A | 681 ><A |
675 HREF="guidevideo.html" | 682 HREF="guidevideo.html" |
683 ACCESSKEY="P" | |
676 >Prev</A | 684 >Prev</A |
677 ></TD | 685 ></TD |
678 ><TD | 686 ><TD |
679 WIDTH="34%" | 687 WIDTH="34%" |
680 ALIGN="center" | 688 ALIGN="center" |
681 VALIGN="top" | 689 VALIGN="top" |
682 ><A | 690 ><A |
683 HREF="index.html" | 691 HREF="index.html" |
692 ACCESSKEY="H" | |
684 >Home</A | 693 >Home</A |
685 ></TD | 694 ></TD |
686 ><TD | 695 ><TD |
687 WIDTH="33%" | 696 WIDTH="33%" |
688 ALIGN="right" | 697 ALIGN="right" |
689 VALIGN="top" | 698 VALIGN="top" |
690 ><A | 699 ><A |
691 HREF="guideinput.html" | 700 HREF="guideinput.html" |
701 ACCESSKEY="N" | |
692 >Next</A | 702 >Next</A |
693 ></TD | 703 ></TD |
694 ></TR | 704 ></TR |
695 ><TR | 705 ><TR |
696 ><TD | 706 ><TD |
702 WIDTH="34%" | 712 WIDTH="34%" |
703 ALIGN="center" | 713 ALIGN="center" |
704 VALIGN="top" | 714 VALIGN="top" |
705 ><A | 715 ><A |
706 HREF="guidevideo.html" | 716 HREF="guidevideo.html" |
717 ACCESSKEY="U" | |
707 >Up</A | 718 >Up</A |
708 ></TD | 719 ></TD |
709 ><TD | 720 ><TD |
710 WIDTH="33%" | 721 WIDTH="33%" |
711 ALIGN="right" | 722 ALIGN="right" |