Debian Codegraph @

src/base_rendering/dglopengl/dglOpenGL.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" >
4 <head>
5 <title>Delphi/Free Pascal OpenGL Community - OpenGL Header</title>
6
7 <style type="text/css" media="all">
8 <!--
9 body {
10 color: #000000;
11 background: #FFFFFF;
12 font-family: lucida sans, sans, verdana, tahoma;
13 font-size: 12px;
14 margin: 10px;
15 }
16
17 #content {
18 margin: 0 0 0 10px;
19 }
20
21 #content pre {
22 font-family: monospace;
23 font-size: 90%;
24 color: #000000;
25 background: #F7F7F7;
26 border-width: 1px;
27 border-color: #AAAAAA;
28 border-style: solid;
29 margin-left: 15px;
30 padding-left: 3px;
31 }
32
33 #content p {
34 margin: 0 0 10px 15px;
35 }
36
37 #content ul {
38 margin-top: 0;
39 margin-bottom: 0;
40 }
41
42 h1 {
43 margin: 0 0 5px;
44 font-size: 195%;
45 font-weight: bold;
46 }
47
48 h2 {
49 margin: 15px 0 5px;
50 font-size: 125%;
51 border-bottom: 1px solid #888;
52 }
53
54 h3 {
55 font-style: italic;
56 margin: 5px 0 5px;
57 font-size: 100%;
58 }
59 -->
60 </style>
61 </head>
62 <body>
63 <div id="header">
64 <h1>Delphi/Free Pascal OpenGL Header for OpenGL 4.4b - Readme -</h1>
65 <div id="content">
66 <p>(obtained and maintained through <a href="http://www.delphigl.com" target="_blank">www.delphigl.com</a>)</p>
67 </div>
68 </div>
69
70 <div id="content">
71 <h2>Content</h2>
72 <p><a href="#desc">Description</a><br>
73 <a href="#howto">How to use</a><br>
74 <a href="#support">Support</a><br>
75 <a href="#credits">Credits</a><br>
76 <a href="#copyright">Copyright</a><br></p>
77 </div>
78
79 <div id="content">
80 <a name="desc" />
81 <h2>Description</h2>
82 <p>This is the readme for the OpenGL-Headers for Delphi/FreePascal that has been developed by DGL's OpenGL2.0-Portteam. Please read carefully through this file before using the header to avoid common problems and faults.
83
84 The changelog is included in the source file itself.
85 </p>
86 </p>
87 </div>
88
89 <div id="content">
90 <h2>Note</h2>
91 <p>OpenGL-Header is for Borland Delphi 4 and above (tested with Delphi 7) and FreePascal.<br />
92 Containts the translations of glext.h, gl_1_1.h, glu.h and weglext.h.<br />
93 It also contains some helperfunctions that were inspired by those found in Mike Lischke's OpenGL12.pas.</p>
94 </div>
95
96 <div id="content">
97 <a name="howto" />
98 <h2>How to use</h2>
99 <p>Before you can use any of the gl-functions contained in the header, you'll have to call InitOpenGL to initialize the functionpointers. In your app it should look something like that :</p>
100
101 <pre id="code">
102 procedure MyGLInit;
103 begin
104 InitOpenGL; // Don't forget, or first gl-Call will result in an access violation!
105 MyDC := GetDC(...);
106 MyRC := CreateRenderingContext(...);
107 ActivateRenderingContext(MyDC, MyRC); // Necessary, will also read some extension
108 ...
109 end;</pre>
110 <p>After doing the above initialisation, you're ready to use all OpenGL-Functions and extensions your card supports. And also don't forget to release your context properly when exiting :</p>
111 <pre id="code">
112 procedure MyDeInit;
113 begin
114 DeactivateRenderingContext; // Deactivates the current context
115 wglDeleteContext(myRC);
116 ReleaseDC(Handle, myDC);
117 end;</pre>
118 </div>
119
120 <div id="content">
121 <a name="howto" />
122 <h2>Creating a versioned rendering context</h2>
123 <p>As of OpenGL version 4.4, the header offers an additional way of creating a rendercontext, that allows for setting the desired OpenGL version and (if applicable) wether to create a forward compatible context (see OpenGL man pages on what that means) :
124 <pre id="code">
125 procedure MyGLInit;
126 begin
127 DC := GetDC(...);
128 RC := CreateRenderingContextVersion(DC, [opDoubleBuffered], 4, 2, True, 32, 24, 8, 0, 0, 0); // Creates an OpenGL 4.2 forward-compatible context
129 InitOpenGL; // Don't forget, or first gl-Call will result in an access violation!
130 ...
131 end;</pre>
132 Only use this method of creating a rendering context if you're sure what you're doing. Trying to create a versioned rendering context that's not supported by the target OpenGL implementation may fail!
133
134 </p>
135 </div>
136
137
138 <div id="content">
139 <a name="support" />
140 <h2>Support</h2>
141 <p>If you have problems, want to ask a question or think you may have encountered a bug in the header, please feel free to use the support-threads in our forums :<br />
142 <a href="http://www.delphigl.com/forum/viewtopic.php?t=2207" target="_blank">English support</a><br />
143 <a href="http://www.delphigl.com/forum/viewtopic.php?t=1863" target="_blank">German support</a></p>
144 </div>
145
146 <div id="content">
147 <a name="credits" />
148 <h2>Credits</h2>
149 <div id="content">
150 <p><h3>Converted and maintained by DGL's GL2.0-Team :</h3>
151 <p>Sascha Willems (<a href="http://www.delphigl.de" target="_blank">http://www.delphigl.de</a>)<br>
152 Steffen Xonna (Lossy eX, <a href="http://www.dev-center.de" target="_blank">http://www.dev-center.de</a>)<br>
153 </p>
154 <h3>Additional input :</h3>
155 <p> Andrey Gruzdev for the Mac OS X patch for XE2 / FPC
156 Lars Middendorf
157 Martin Waldegger (Mars)<br>
158 Nico Michaelis (Delphic) for the Linux version of the header (<a href="http://www.delphigl.com/forum/viewtopic.php?t=2577" target="_blank">see here</a>)<br>
159 Benjamin Rosseaux (BeRo) for expanding the header for use with Free Pascal<br>
160 And thanks to all who helps us to make the header better</p></p>
161 </div>
162 </div>
163
164 <div id="content">
165 <a name="copyright" />
166 <h2>Copyright</h2>
167 <p>This Source Code Form is subject to the terms of the Mozilla Public License,
168 v. 2.0. If a copy of the MPL was not distributed with this file,
169 You can obtain one at http://mozilla.org/MPL/2.0/.
170 Software distributed under the License is distributed on an
171 "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
172 implied. See the License for the specific language governing
173 rights and limitations under the License.<br></p>
174 <p>Software distributed under the License is distributed on an<br>
175 "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or<br>
176 implied. See the License for the specific language governing<br>
177 rights and limitations under the License.</p>
178 </div>
179
180 <div id="content">
181 Copyright (c) 2003-2015 DGL-OpenGL-Portteam - All Rights Reserved
182 </div>
183 </div>
184
185 </body>
186 </html>
187