(obtained and maintained through www.delphigl.com)
(obtained and maintained through www.delphigl.com)
Description
Note
How to use
Support
History
Credits
Copyright
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.
OpenGL-Header is for Borland Delphi 4 and above (tested with Delphi 7) and FreePascal.
Containts the translations of glext.h, gl_1_1.h, glu.h and weglext.h.
It also contains some helperfunctions that were inspired by those found in Mike Lischke's OpenGL12.pas.
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 :
procedure MyGLInit; begin InitOpenGL; // Don't forget, or first gl-Call will result in an access violation! MyDC := GetDC(...); MyRC := CreateRenderingContext(...); ActivateRenderingContext(MyDC, MyRC); // Necessary, will also read some extension ... end;
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 :
procedure MyDeInit; begin DeactivateRenderingContext; // Deactivates the current context wglDeleteContext(myRC); ReleaseDC(Handle, myDC); end;
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 :
English support
German support
Version 1.0 - Initial Release Version 1.1 - Added PPointer in Tpyessection for compatiblity with Delphi versions lower than 7 (SW) - Added a function named RaiseLastOSError including a comment on how to make it run under Delphi versions lower than 7 (SW) - Added some data types according to the GL-Syntax (SW) Version 1.2 - Fixed some problems with getting the addresses of some Extensions (e.g. glTexImage3D) where the EXT/ARB did work but not the core-functions (SW) Version 1.3 - A second call to ReadimplementationProperties won't revert to the default libs anymore (MW) - Libraries now will be released if necessary (MW) Version 1.3a - Small fixes for glSlang-functions (SW) Version 1.3b - Fixed a small bug with GL_ARB_shader_objects, that lead lead to that extension not loaded correctly (SW) Version 1.3c - More GL 1.5 compliance by FOG_COORD_xx and ARB-less VBO and occlusion query routines (MW) Version 1.3d - Fixed linebreaks (should now be corrected under D5) (SW) Version 1.4 - Changed header to correspond to the OpenGL-Shading - Language specification 1.10 : - Added new GL_SAMPLER_*-Constants - Added Constant GL_SHADING_LANGUAGE_VERSION_ARB - Added Constant GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB - Added Constant GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB (SW) Version 1.4a - Fixed a missing stdcall for glBindAttribLocationARB (SW) Version 1.4b - Fixed declaration for glUniform*(f/i)vARB (added count) (MW) - glCompileShaderARB changed from function to procedure (MW) Version 1.5 - Added support for FreePascal (BR) - Added type TGLVectorf3/TGLVector3f (SW) Version 1.6 - Added Extension GL_EXT_framebuffer_object (SX) Version 1.7 - Added Extension GL_ARB_fragment_program_shadow (SX) - Added Extension GL_ARB_draw_buffers (SX) - Added Extension GL_ARB_texture_rectangle (SX) - Added Extension GL_ARB_color_buffer_float (SX) - Added Extension GL_ARB_half_float_pixel (SX) - Added Extension GL_ARB_texture_float (SX) - Added Extension GL_ARB_pixel_buffer_object (SX) - Added Extension GL_EXT_depth_bounds_test (SX) - Added Extension GL_EXT_texture_mirror_clamp (SX) - Added Extension GL_EXT_blend_equation_separate (SX) - Added Extension GL_EXT_pixel_buffer_object (SX) - Added Extension GL_EXT_texture_compression_dxt1 (SX) - Added Extension GL_NV_fragment_program_option (SX) - Added Extension GL_NV_fragment_program2 (SX) - Added Extension GL_NV_vertex_program2_option (SX) - Added Extension GL_NV_vertex_program3 (SX) Version 1.8 - Added explicit delegate type definitions (LM) - Added .Net 1.1 Support (LM) - Added .Net overloaded functions (LM) - Added delayed extension loading and stubs (LM) - Added automatic InitOpenGL call in CreateRenderingContext(LM) - Added extra Read_* function (LM) Version 2.0 - fixed some Problem with version string and damn drivers. String 1.15 identified as OpenGL 1.5 not as OpenGL 1.1 (SX) - Removed unexisting extension GL_ARB_texture_mirror_repeat(SX) - Added Extension WGL_ARB_pixel_format_float (SX) - Added Extension GL_EXT_stencil_clear_tag (SX) - Added Extension GL_EXT_texture_rectangle (SX) - Added Extension GL_EXT_texture_edge_clamp (SX) - Some 1.5 Core Consts added (now completed) (SX) - gluProject need pointer for not .net (SX) - gluUnProject need pointer for not .net (SX) - wglUseFontOutlines* need pointer for not .net (SX) - wglSwapMultipleBuffers need pointer for not .net (SX) - Bug with wglGetExtensionsStringEXT removed different type for .net (SX) - Added OpenGL 2.0 Core (SX) Version 2.0.1 - fixed some problems with glGetActiveAttrib in 2.0 Core (SX) - fixed some problems with gluProject (SX) - fixed some problems with gluUnProject (SX) - fixed some problems with gluTessVertex (SX) - fixed some problems with gluLoadSamplingMatrices (SX)
Sascha Willems (http://www.delphigl.de)
Steffen Xonna (Lossy eX, http://www.dev-center.de)
Lars Middendorf (http://www.3d-seite.de)
Martin Waldegger (Mars, http://www.basegraph.com )
Nico Michaelis (Delphic) for the Linux version of the header (see here)
Benjamin Rosseaux (BeRo) for expanding the header so that it now also can be used with FreePascal
The contents of this file are used with permission, subject to
the Mozilla Public License Version 1.1 (the "License"); you may
not use this file except in compliance with the License. You may
obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
Software distributed under the License is distributed on an
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.