1 {$INCLUDE ../shared/a_modes.inc}
9 GLenum
= cuint
; PGLenum
= ^GLenum
;
10 GLboolean
= cuchar
; PGLboolean
= ^GLboolean
;
11 GLbitfield
= cuint
; PGLbitfield
= ^GLbitfield
;
12 GLbyte
= cschar
; PGLbyte
= ^GLbyte
;
13 GLshort
= cshort
; PGLshort
= ^GLshort
;
14 GLint
= cint
; PGLint
= ^GLint
;
15 GLsizei
= cint
; PGLsizei
= ^GLsizei
;
16 GLubyte
= cuchar
; PGLubyte
= ^GLubyte
;
17 GLushort
= cushort
; PGLushort
= ^GLushort
;
18 GLuint
= cuint
; PGLuint
= ^GLuint
;
19 GLfloat
= cfloat
; PGLfloat
= ^GLfloat
;
20 GLclampf
= cfloat
; PGLclampf
= ^GLclampf
;
21 GLdouble
= cdouble
; PGLdouble
= ^GLdouble
;
22 GLclampd
= cdouble
; PGLclampd
= ^GLclampd
;
23 { GLvoid = void; } PGLvoid
= Pointer; PPGLvoid
= ^PGLvoid
;
24 GLfixed
= cint
; PGLfixed
= ^Integer;
25 GLclampx
= cint
; PGLclampx
= ^Integer;
28 TGLboolean
= GLboolean
;
29 TGLbitfield
= GLbitfield
;
46 GL_INVALID_ENUM
= $0500;
47 GL_INVALID_VALUE
= $0501;
48 GL_INVALID_OPERATION
= $0502;
49 GL_STACK_OVERFLOW
= $0503;
50 GL_STACK_UNDERFLOW
= $0504;
51 GL_OUT_OF_MEMORY
= $0505;
53 GL_DEPTH_TEST
= $0B71;
54 GL_SCISSOR_TEST
= $0C11;
56 GL_PROJECTION
= $1701;
59 GL_ONE_MINUS_SRC_ALPHA
= $0303;
61 GL_TEXTURE_2D
= $0DE1;
69 GL_ONE_MINUS_DST_COLOR
= $0307;
71 GL_COLOR_BUFFER_BIT
= $00004000;
73 GL_UNSIGNED_BYTE
= $1401;
74 GL_ALPHA_TEST
= $0BC0;
76 GL_TEXTURE_WRAP_S
= $2802;
77 GL_TEXTURE_WRAP_T
= $2803;
79 GL_CLAMP_TO_EDGE
= $812F;
80 GL_TEXTURE_MIN_FILTER
= $2801;
81 GL_TEXTURE_MAG_FILTER
= $2800;
83 GL_POINT_SMOOTH
= $0B10;
84 GL_STENCIL_TEST
= $0B90;
85 GL_SCISSOR_BOX
= $0C10;
89 GL_STENCIL_BUFFER_BIT
= $00000400;
94 GL_TEXTURE_ENV
= $2300;
95 GL_TEXTURE_ENV_MODE
= $2200;
98 GL_INVALID_FRAMEBUFFER_OPERATION
= $0506;
99 GL_FRAMEBUFFER_DEFAULT
= $8218;
100 GL_FRAMEBUFFER_UNDEFINED
= $8219;
101 GL_DEPTH_STENCIL_ATTACHMENT
= $821A;
102 GL_MAX_RENDERBUFFER_SIZE
= $84E8;
103 GL_DEPTH_STENCIL
= $84F9;
104 GL_DEPTH_COMPONENT16
= $81A5;
105 GL_DEPTH24_STENCIL8
= $88F0;
106 GL_FRAMEBUFFER_BINDING
= $8CA6;
107 GL_DRAW_FRAMEBUFFER_BINDING
= GL_FRAMEBUFFER_BINDING
;
108 GL_RENDERBUFFER_BINDING
= $8CA7;
109 GL_READ_FRAMEBUFFER
= $8CA8;
110 GL_DRAW_FRAMEBUFFER
= $8CA9;
111 GL_READ_FRAMEBUFFER_BINDING
= $8CAA;
112 GL_RENDERBUFFER_SAMPLES
= $8CAB;
113 GL_FRAMEBUFFER_COMPLETE
= $8CD5;
114 GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
= $8CD6;
115 GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
= $8CD7;
116 GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER
= $8CDB;
117 GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER
= $8CDC;
118 GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
= $8D56;
119 GL_FRAMEBUFFER_UNSUPPORTED
= $8CDD;
120 GL_MAX_COLOR_ATTACHMENTS
= $8CDF;
121 GL_COLOR_ATTACHMENT0
= $8CE0;
122 GL_DEPTH_ATTACHMENT
= $8D00;
123 GL_STENCIL_ATTACHMENT
= $8D20;
124 GL_FRAMEBUFFER
= $8D40;
125 GL_RENDERBUFFER
= $8D41;
126 GL_STENCIL_INDEX1
= $8D46;
127 GL_STENCIL_INDEX4
= $8D47;
128 GL_STENCIL_INDEX8
= $8D48;
129 GL_MAX_SAMPLES
= $8D57;
134 GL_EXTENSIONS
= $1F03;
135 GL_SHADING_LANGUAGE_VERSION
= $8B8C;
136 GL_MAX_TEXTURE_SIZE
= $0D33;
139 // GL_CULL_FACE = $0B44;
141 // GL_VERTEX_ARRAY = $8074;
142 // GL_NORMAL_ARRAY = $8075;
143 // GL_COLOR_ARRAY = $8076;
144 // GL_TEXTURE_COORD_ARRAY = $8078;
145 // GL_NOTEQUAL = $0205;
146 // GL_LINE_SMOOTH = $0B20;
147 // GL_POLYGON_SMOOTH = $0B41;
148 // GL_LIGHTING = $0B50;
149 // GL_DITHER = $0BD0;
150 // GL_MODELVIEW_MATRIX = $0BA6;
151 // GL_MATRIX_MODE = $0BA0;
152 // GL_TEXTURE_BINDING_2D = $8069;
153 // GL_TEXTURE = $1702;
155 // GL_ALL_ATTRIB_BITS = $000FFFFF;
157 procedure glEnable(cap
: GLenum
);
158 procedure glDisable(cap
: GLenum
);
159 function glIsEnabled(cap
: GLenum
): GLboolean
;
160 function glGetString(name
: GLenum
): PChar;
161 function glGetError
: GLenum
;
162 procedure glClearColor(red
, green
, blue
, alpha
: GLclampf
);
163 procedure glClear(mask
: GLbitfield
);
164 procedure glAlphaFunc(func
: GLenum
; ref
: GLclampf
);
165 procedure glBlendFunc(sfactor
, dfactor
: GLenum
);
166 procedure glPointSize(size
: GLfloat
);
167 procedure glLineWidth(width
: GLfloat
);
168 procedure glGetIntegerv(pname
: GLenum
; params
: PGLint
);
172 procedure glBegin(mode
: GLenum
);
174 procedure glTexCoord2f(s
, t
: GLfloat
);
175 procedure glVertex2i(x
, y
: GLint
);
176 procedure glColor4ub(red
, green
, blue
, alpha
: GLubyte
);
177 procedure glColor3ub(red
, green
, blue
: GLubyte
);
178 procedure glVertex2f(x
, y
: GLfloat
);
179 procedure glTexCoord2i(s
, t
: GLint
);
180 procedure glColor4f(red
, green
, blue
, alpha
: GLfloat
);
182 procedure glReadPixels(x
, y
: GLint
; width
, height
: GLsizei
; format
, atype
: GLenum
; pixels
: Pointer);
184 procedure glOrtho (left
, right
, bottom
, top
, near, far: GLdouble
);
185 procedure glLoadIdentity
;
186 procedure glScissor(x
, y
: GLint
; width
, height
: GLsizei
);
187 procedure glViewport(x
, y
: GLint
; width
, height
: GLsizei
);
188 procedure glMatrixMode(mode
: GLenum
);
189 procedure glLoadMatrixd(const m
: PGLdouble
);
190 procedure glPushMatrix
;
191 procedure glTranslatef(x
, y
, z
: GLfloat
);
192 procedure glRotatef(angle
, x
, y
, z
: GLfloat
);
193 procedure glScalef(x
, y
, z
: GLfloat
);
194 procedure glPopMatrix
;
196 procedure glStencilMask(mask
: GLuint
);
197 procedure glStencilFunc(func
: GLenum
; ref
: GLint
; mask
: GLuint
);
198 procedure glStencilOp(fail
, zfail
, zpass
: GLenum
);
199 procedure glColorMask(red
, green
, blue
, alpha
: GLboolean
);
201 procedure glBindTexture(target
: GLenum
; texture
: GLuint
);
202 procedure glGenTextures(n
: GLsizei
; textures
: PGLuint
);
203 procedure glTexEnvi(target
: GLenum
; pname
: GLenum
; param
: GLint
);
204 procedure glTexParameterf(target
: GLenum
; pname
: GLenum
; param
: GLfloat
);
205 procedure glTexParameteri(target
: GLenum
; pname
: GLenum
; param
: GLint
);
206 procedure glTexImage2D(target
: GLenum
; level
, internalformat
: GLint
; width
, height
: GLsizei
; border
: GLint
; format
, atype
: GLenum
; const pixels
: Pointer);
207 procedure glTexSubImage2D(target
: GLenum
; level
, xoffset
, yoffset
: GLint
; width
, height
: GLsizei
; format
, atype
: GLenum
; const pixels
: Pointer);
208 procedure glDeleteTextures(n
: GLsizei
; const textures
: PGLuint
);
210 procedure glGenFramebuffers(n
: GLsizei
; framebuffers
: PGLuint
);
211 procedure glBindFramebuffer(target
: GLenum
; framebuffer
: GLuint
);
212 procedure glFramebufferTexture2D(target
, attachment
, textarget
: GLenum
; texture
: GLuint
; level
: GLint
);
213 procedure glFramebufferRenderbuffer(target
, attachment
, rbotarget
: GLenum
; rbo
: GLuint
);
214 function glCheckFramebufferStatus(framebuffer
: GLuint
): GLenum
;
215 procedure glDeleteFramebuffers(n
: GLsizei
; const framebuffers
: PGLuint
);
217 procedure glGenRenderbuffers(n
: GLsizei
; renderbuffers
: PGLuint
);
218 procedure glBindRenderbuffer(target
: GLenum
; renderbuffer
: GLuint
);
219 procedure glRenderbufferStorage(target
, internalformat
: GLenum
; w
, h
: GLsizei
);
220 procedure glDeleteRenderbuffers(n
: GLsizei
; const renderbuffers
: PGLuint
);
222 // procedure glVertexPointer(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer);
223 // procedure glEnableClientState(aarray: GLenum);
224 // procedure glDisableClientState(aarray: GLenum);
225 // procedure glDrawArrays(mode: GLenum; first: GLint; count: GLsizei);
226 // procedure glGetFloatv(pname: GLenum; params: PGLfloat);
227 // procedure glPushAttrib(mask: GLbitfield);
228 // procedure glOrtho(left, right, bottom, top, zNear, zFar: GLdouble);
229 // procedure glPopAttrib;
230 // procedure glColorPointer(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer);
234 function nogl_ExtensionSupported(ext
: string): Boolean;