Delphi/Free Pascal OpenGL1.5-Header -Readme-

(obtained and maintained through www.delphigl.com)

Contents
Description
How to use
Support
History
Credits
Copyright

Note
This is the readme for the OpenGL1.5-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.

Description :
OpenGL 1.5-Header 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.

Also contains the new OpenGL1.5-Extensions :
  • GL_ARB_occlusion_query (Specs)
  • GL_ARB_shader_objects (Specs)
  • GL_ARB_vertex_shader (Specs)
  • GL_ARB_fragment_shader (Specs)
  • GL_ARB_shading_language_100 (Specs)
  • GL_ARB_texture_non_power_of_two (Specs)
  • GL_ARB_point_sprite (Specs)
  • GL_EXT_framebuffer_object (Specs)

  • How to use :
    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 any problems concerning the how-to use of this header, just download the according Template, where you'll see how to exactly write a simple gl app with our header.

    Support :
    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

    History :
    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)

    Credits :
    Converted and maintained by DGL's GL2.0-Team :
     Sascha Willems (http://www.delphigl.de)
     Steffen Xonna (LossyEx, http://www.dev-center.de)
     Lars Middendorf (http://www.3d-seite.de)
    Additional input :
     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

    Copyright :
    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.

    Copyright (C) DGL-OpenGL2-Portteam 2003-2004 - All Rights Reserved