No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

188 líneas
6.3 KiB

  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. <style type="text/css" media="all">
  7. <!--
  8. body {
  9. color: #000000;
  10. background: #FFFFFF;
  11. font-family: lucida sans, sans, verdana, tahoma;
  12. font-size: 12px;
  13. margin: 10px;
  14. }
  15. #content {
  16. margin: 0 0 0 10px;
  17. }
  18. #content pre {
  19. font-family: monospace;
  20. font-size: 90%;
  21. color: #000000;
  22. background: #F7F7F7;
  23. border-width: 1px;
  24. border-color: #AAAAAA;
  25. border-style: solid;
  26. margin-left: 15px;
  27. padding-left: 3px;
  28. }
  29. #content p {
  30. margin: 0 0 10px 15px;
  31. }
  32. #content ul {
  33. margin-top: 0;
  34. margin-bottom: 0;
  35. }
  36. h1 {
  37. margin: 0 0 5px;
  38. font-size: 195%;
  39. font-weight: bold;
  40. }
  41. h2 {
  42. margin: 15px 0 5px;
  43. font-size: 125%;
  44. border-bottom: 1px solid #888;
  45. }
  46. h3 {
  47. font-style: italic;
  48. margin: 5px 0 5px;
  49. font-size: 100%;
  50. }
  51. -->
  52. </style>
  53. </head>
  54. <body>
  55. <div id="header">
  56. <h1>Delphi/Free Pascal OpenGL Header for OpenGL 4.4b - Readme -</h1>
  57. <div id="content">
  58. <p>(obtained and maintained through <a href="http://www.delphigl.com" target="_blank">www.delphigl.com</a>)</p>
  59. </div>
  60. </div>
  61. <div id="content">
  62. <h2>Content</h2>
  63. <p><a href="#desc">Description</a><br>
  64. <a href="#howto">How to use</a><br>
  65. <a href="#support">Support</a><br>
  66. <a href="#credits">Credits</a><br>
  67. <a href="#copyright">Copyright</a><br></p>
  68. </div>
  69. <div id="content">
  70. <a name="desc" />
  71. <h2>Description</h2>
  72. <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.
  73. The changelog is included in the source file itself.
  74. </p>
  75. </p>
  76. </div>
  77. <div id="content">
  78. <h2>Note</h2>
  79. <p>OpenGL-Header is for Borland Delphi 4 and above (tested with Delphi 7) and FreePascal.<br />
  80. Containts the translations of glext.h, gl_1_1.h, glu.h and weglext.h.<br />
  81. It also contains some helperfunctions that were inspired by those found in Mike Lischke's OpenGL12.pas.</p>
  82. </div>
  83. <div id="content">
  84. <a name="howto" />
  85. <h2>How to use</h2>
  86. <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>
  87. <pre id="code">
  88. procedure MyGLInit;
  89. begin
  90. InitOpenGL; // Don't forget, or first gl-Call will result in an access violation!
  91. MyDC := GetDC(...);
  92. MyRC := CreateRenderingContext(...);
  93. ActivateRenderingContext(MyDC, MyRC); // Necessary, will also read some extension
  94. ...
  95. end;</pre>
  96. <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>
  97. <pre id="code">
  98. procedure MyDeInit;
  99. begin
  100. DeactivateRenderingContext; // Deactivates the current context
  101. wglDeleteContext(myRC);
  102. ReleaseDC(Handle, myDC);
  103. end;</pre>
  104. </div>
  105. <div id="content">
  106. <a name="howto" />
  107. <h2>Creating a versioned rendering context</h2>
  108. <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) :
  109. <pre id="code">
  110. procedure MyGLInit;
  111. begin
  112. DC := GetDC(...);
  113. RC := CreateRenderingContextVersion(DC, [opDoubleBuffered], 4, 2, True, 32, 24, 8, 0, 0, 0); // Creates an OpenGL 4.2 forward-compatible context
  114. InitOpenGL; // Don't forget, or first gl-Call will result in an access violation!
  115. ...
  116. end;</pre>
  117. 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!
  118. </p>
  119. </div>
  120. <div id="content">
  121. <a name="support" />
  122. <h2>Support</h2>
  123. <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 />
  124. <a href="http://www.delphigl.com/forum/viewtopic.php?t=2207" target="_blank">English support</a><br />
  125. <a href="http://www.delphigl.com/forum/viewtopic.php?t=1863" target="_blank">German support</a></p>
  126. </div>
  127. <div id="content">
  128. <a name="credits" />
  129. <h2>Credits</h2>
  130. <div id="content">
  131. <p><h3>Converted and maintained by DGL's GL2.0-Team :</h3>
  132. <p>Sascha Willems (<a href="http://www.delphigl.de" target="_blank">http://www.delphigl.de</a>)<br>
  133. Steffen Xonna (Lossy eX, <a href="http://www.dev-center.de" target="_blank">http://www.dev-center.de</a>)<br>
  134. </p>
  135. <h3>Additional input :</h3>
  136. <p> Andrey Gruzdev for the Mac OS X patch for XE2 / FPC
  137. Lars Middendorf
  138. Martin Waldegger (Mars)<br>
  139. 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>
  140. Benjamin Rosseaux (BeRo) for expanding the header for use with Free Pascal<br>
  141. And thanks to all who helps us to make the header better</p></p>
  142. </div>
  143. </div>
  144. <div id="content">
  145. <a name="copyright" />
  146. <h2>Copyright</h2>
  147. <p>This Source Code Form is subject to the terms of the Mozilla Public License,
  148. v. 2.0. If a copy of the MPL was not distributed with this file,
  149. You can obtain one at http://mozilla.org/MPL/2.0/.
  150. Software distributed under the License is distributed on an
  151. "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  152. implied. See the License for the specific language governing
  153. rights and limitations under the License.<br></p>
  154. <p>Software distributed under the License is distributed on an<br>
  155. "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or<br>
  156. implied. See the License for the specific language governing<br>
  157. rights and limitations under the License.</p>
  158. </div>
  159. <div id="content">
  160. Copyright (c) 2003-2015 DGL-OpenGL-Portteam - All Rights Reserved
  161. </div>
  162. </div>
  163. </body>
  164. </html>