【delphi开源代码栏目提醒】:网学会员delphi开源代码为您提供dglOpenGL.pas参考,解决您在dglOpenGL.pas学习中工作中的难题,参考学习。
{==============================================================================}
{ }
{ Borland Delphi Runtime Library }
{ OpenGL1.5 - Headertranslation (includes GL1.1-1.5) }
{ Version 1.3 }
{ Date : 01.12.2003 }
{ }
{==============================================================================}
{ }
{ 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 }
{ - GL_ARB_shader_objects }
{ - GL_ARB_vertex_shader }
{ - GL_ARB_fragment_shader }
{ - GL_ARB_shading_language_100 }
{ - GL_ARB_texture_non_power_of_two }
{ - GL_ARB_point_sprite }
{ }
{ }
{ Copyright (C) DGL-OpenGL2-Portteam }
{ All Rights Reserved }
{ }
{ Obtained through: }
{ Delphi OpenGL Community(DGL) - www.delphigl.com }
{ }
{ Converted and maintained by DGL's GL2.0-Team : }
{ - Sascha Willems (Son of Satan) - 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.martinscad.cjb.net }
{ }
{==============================================================================}
{ If you have problems on using our unit, then please take a look at }
{ the "how to use.txt". }
{==============================================================================}
{ You may retrieve the latest version of this file at the Delphi OpenGL }
{ Community home page, located at http://www.delphigl.com/ }
{ }
{ 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. }
{ }
{==============================================================================}
{ 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) }
{==============================================================================}
unit dglOpenGL;
interface
uses
SysUtils,
Windows;
type
// Needed for Delphi 6 and less (defined in system.pas for Delphi 7)
PPointer = ^Pointer;
TGLenum = Cardinal;
TGLboolean = BYTEBOOL;
TGLbitfield = Cardinal;
TGLbyte = Shortint;
TGLshort = SmallInt;
TGLint = Integer;
TGLsizei = Integer;
TGLubyte = Byte;
TGLushort = Word;
TGLuint = Cardinal;
TGLfloat = Single;
TGLclampf = Single;
TGLdouble = Double;
TGLclampd = Double;
TGLvoid = Pointer;
TGLint64 = Int64;
GLenum = Cardinal;
GLboolean = BYTEBOOL;
GLbitfield = Cardinal;
GLbyte = Shortint;
GLshort = SmallInt;
GLint = Integer;
GLsizei = Integer;
GLubyte = Byte;
GLushort = Word;
GLuint = Cardinal;
GLfloat = Single;
GLclampf = Single;
GLdouble = Double;
GLclampd = Double;
GLvoid = Pointer;
GLint64 = Int64;
PGLBoolean = ^TGLboolean;
PGLByte = ^TGLbyte;
PGLShort = ^TGLshort;
PGLInt = ^TGLint;
PGLSizei = ^TGLsizei;
PGLubyte = ^TGLubyte;
PGLushort = ^TGLushort;
PGLuint = ^TGLuint;
PGLclampf = ^TGLclampf;
PGLfloat = ^TGLfloat;
PGLdouble = ^TGLdouble;
PGLclampd = ^TGLclampd;
PGLenum = ^TGLenum;
PGLvoid = Pointer;
PGLint64 = ^TGLint64;
// Datatypes corresponding to GL's types TGL(name)(type)(count)
TGLVectori4 = array[0..3] of TGLInt;
TGLVectorf4 = array[0..3] of TGLFloat;
TGLVectord3 = array[0..2] of TGLDouble;
TGLVectord4 = array[0..3] of TGLDouble;
TGLVectorp4 = array[0..3] of Pointer;
TGLArrayf4 = array [0..3] of TGLFloat;
TGLArrayf3 = array [0..2] of TGLFloat;
TGLArrayd3 = array [0..2] of TGLDouble;
TGLArrayi4 = array [0..3] of TGLint;
TGLArrayp4 = array [0..3] of Pointer;
TGLMatrixf4 = array[0..3, 0..3] of Single;
TGLMatrixd4 = array[0..3, 0..3] of Double;
TGlMatrixi4 = array[0..3, 0..3] of Integer;
// Datatypes corresponding to OpenGL12.pas for easy porting
TVector3d = TGLVectord3;
TVector4i = TGLVectori4;
TVector4f = TGLVectorf4;
TVector4p = TGLVectorp4;
TMatrix4f = TGLMatrixf4;
TMatrix4d = TGLMatrixd4;
// WGL_ARB_pbuffer
HPBUFFERARB = THandle;
// WGL_EXT_pbuffer
HPBUFFEREXT = THandle;
// GL_NV_half_float
TGLhalfNV = WORD;
PGLhalfNV = ^TGLhalfNV;
// GL_ARB_SHADER_OBJECTS
PGLHandleARB = ^GLHandleARB;
GLHandleARB = Integer;
PPGLCharARB = ^PGLCharARB;
PGLCharARB = ^GLCharARB;
GLCharARB = Char;
type
// GLU types
TGLUNurbs = record end;
TGLUQuadric = record end;
TGLUTesselator = record end;
PGLUNurbs = ^TGLUNurbs;
PGLUQuadric = ^TGLUQuadric;
PGLUTesselator = ^TGLUTesselator;
// bac
上一篇:
frmForgotPass.frm
下一篇:
10years匿名社交网