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
;
47 GL_DEPTH_TEST
= $0B71;
48 GL_SCISSOR_TEST
= $0C11;
50 GL_PROJECTION
= $1701;
53 GL_ONE_MINUS_SRC_ALPHA
= $0303;
55 GL_TEXTURE_2D
= $0DE1;
62 GL_ONE_MINUS_DST_COLOR
= $0307;
64 GL_COLOR_BUFFER_BIT
= $00004000;
66 GL_UNSIGNED_BYTE
= $1401;
67 GL_ALPHA_TEST
= $0BC0;
69 GL_TEXTURE_WRAP_S
= $2802;
70 GL_TEXTURE_WRAP_T
= $2803;
72 GL_TEXTURE_MIN_FILTER
= $2801;
73 GL_TEXTURE_MAG_FILTER
= $2800;
75 GL_POINT_SMOOTH
= $0B10;
76 GL_STENCIL_TEST
= $0B90;
77 GL_SCISSOR_BOX
= $0C10;
81 GL_STENCIL_BUFFER_BIT
= $00000400;
86 GL_TEXTURE_ENV
= $2300;
87 GL_TEXTURE_ENV_MODE
= $2200;
90 GL_INVALID_FRAMEBUFFER_OPERATION
= $0506;
91 GL_FRAMEBUFFER_DEFAULT
= $8218;
92 GL_FRAMEBUFFER_UNDEFINED
= $8219;
93 GL_DEPTH_STENCIL_ATTACHMENT
= $821A;
94 GL_MAX_RENDERBUFFER_SIZE
= $84E8;
95 GL_DEPTH_STENCIL
= $84F9;
96 GL_DEPTH_COMPONENT16
= $81A5;
97 GL_DEPTH24_STENCIL8
= $88F0;
98 GL_FRAMEBUFFER_BINDING
= $8CA6;
99 GL_DRAW_FRAMEBUFFER_BINDING
= GL_FRAMEBUFFER_BINDING
;
100 GL_RENDERBUFFER_BINDING
= $8CA7;
101 GL_READ_FRAMEBUFFER
= $8CA8;
102 GL_DRAW_FRAMEBUFFER
= $8CA9;
103 GL_READ_FRAMEBUFFER_BINDING
= $8CAA;
104 GL_RENDERBUFFER_SAMPLES
= $8CAB;
105 GL_FRAMEBUFFER_COMPLETE
= $8CD5;
106 GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
= $8CD6;
107 GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
= $8CD7;
108 GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER
= $8CDB;
109 GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER
= $8CDC;
110 GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
= $8D56;
111 GL_FRAMEBUFFER_UNSUPPORTED
= $8CDD;
112 GL_MAX_COLOR_ATTACHMENTS
= $8CDF;
113 GL_COLOR_ATTACHMENT0
= $8CE0;
114 GL_DEPTH_ATTACHMENT
= $8D00;
115 GL_STENCIL_ATTACHMENT
= $8D20;
116 GL_FRAMEBUFFER
= $8D40;
117 GL_RENDERBUFFER
= $8D41;
118 GL_STENCIL_INDEX1
= $8D46;
119 GL_STENCIL_INDEX4
= $8D47;
120 GL_STENCIL_INDEX8
= $8D48;
121 GL_MAX_SAMPLES
= $8D57;
126 GL_EXTENSIONS
= $1F03;
127 GL_SHADING_LANGUAGE_VERSION
= $8B8C;
130 // GL_CULL_FACE = $0B44;
132 // GL_VERTEX_ARRAY = $8074;
133 // GL_NORMAL_ARRAY = $8075;
134 // GL_COLOR_ARRAY = $8076;
135 // GL_TEXTURE_COORD_ARRAY = $8078;
136 // GL_NOTEQUAL = $0205;
137 // GL_LINE_SMOOTH = $0B20;
138 // GL_POLYGON_SMOOTH = $0B41;
139 // GL_LIGHTING = $0B50;
140 // GL_DITHER = $0BD0;
141 // GL_MODELVIEW_MATRIX = $0BA6;
142 // GL_MATRIX_MODE = $0BA0;
143 // GL_TEXTURE_BINDING_2D = $8069;
144 // GL_TEXTURE = $1702;
146 // GL_ALL_ATTRIB_BITS = $000FFFFF;
148 procedure glEnable(cap
: GLenum
);
149 procedure glDisable(cap
: GLenum
);
150 function glIsEnabled(cap
: GLenum
): GLboolean
;
151 function glGetString(name
: GLenum
): PChar;
152 function glGetError
: GLenum
;
153 procedure glClearColor(red
, green
, blue
, alpha
: GLclampf
);
154 procedure glClear(mask
: GLbitfield
);
155 procedure glAlphaFunc(func
: GLenum
; ref
: GLclampf
);
156 procedure glBlendFunc(sfactor
, dfactor
: GLenum
);
157 procedure glPointSize(size
: GLfloat
);
158 procedure glLineWidth(width
: GLfloat
);
159 procedure glGetIntegerv(pname
: GLenum
; params
: PGLint
);
163 procedure glBegin(mode
: GLenum
);
165 procedure glTexCoord2f(s
, t
: GLfloat
);
166 procedure glVertex2i(x
, y
: GLint
);
167 procedure glColor4ub(red
, green
, blue
, alpha
: GLubyte
);
168 procedure glColor3ub(red
, green
, blue
: GLubyte
);
169 procedure glVertex2f(x
, y
: GLfloat
);
170 procedure glTexCoord2i(s
, t
: GLint
);
171 procedure glColor4f(red
, green
, blue
, alpha
: GLfloat
);
173 procedure glReadPixels(x
, y
: GLint
; width
, height
: GLsizei
; format
, atype
: GLenum
; pixels
: Pointer);
175 procedure glLoadIdentity
;
176 procedure glScissor(x
, y
: GLint
; width
, height
: GLsizei
);
177 procedure glViewport(x
, y
: GLint
; width
, height
: GLsizei
);
178 procedure glMatrixMode(mode
: GLenum
);
179 procedure glLoadMatrixd(const m
: PGLdouble
);
180 procedure glPushMatrix
;
181 procedure glTranslatef(x
, y
, z
: GLfloat
);
182 procedure glRotatef(angle
, x
, y
, z
: GLfloat
);
183 procedure glScalef(x
, y
, z
: GLfloat
);
184 procedure glPopMatrix
;
186 procedure glStencilMask(mask
: GLuint
);
187 procedure glStencilFunc(func
: GLenum
; ref
: GLint
; mask
: GLuint
);
188 procedure glStencilOp(fail
, zfail
, zpass
: GLenum
);
189 procedure glColorMask(red
, green
, blue
, alpha
: GLboolean
);
191 procedure glBindTexture(target
: GLenum
; texture
: GLuint
);
192 procedure glGenTextures(n
: GLsizei
; textures
: PGLuint
);
193 procedure glTexEnvi(target
: GLenum
; pname
: GLenum
; param
: GLint
);
194 procedure glTexParameterf(target
: GLenum
; pname
: GLenum
; param
: GLfloat
);
195 procedure glTexParameteri(target
: GLenum
; pname
: GLenum
; param
: GLint
);
196 procedure glTexImage2D(target
: GLenum
; level
, internalformat
: GLint
; width
, height
: GLsizei
; border
: GLint
; format
, atype
: GLenum
; const pixels
: Pointer);
197 procedure glTexSubImage2D(target
: GLenum
; level
, xoffset
, yoffset
: GLint
; width
, height
: GLsizei
; format
, atype
: GLenum
; const pixels
: Pointer);
198 procedure glDeleteTextures(n
: GLsizei
; const textures
: PGLuint
);
200 procedure glGenFramebuffers(n
: GLsizei
; framebuffers
: PGLuint
);
201 procedure glBindFramebuffer(target
: GLenum
; framebuffer
: GLuint
);
202 procedure glFramebufferTexture2D(target
, attachment
, textarget
: GLenum
; texture
: GLuint
; level
: GLint
);
203 procedure glFramebufferRenderbuffer(target
, attachment
, rbotarget
: GLenum
; rbo
: GLuint
);
204 function glCheckFramebufferStatus(framebuffer
: GLuint
): GLenum
;
205 procedure glDeleteFramebuffers(n
: GLsizei
; const framebuffers
: PGLuint
);
207 procedure glGenRenderbuffers(n
: GLsizei
; renderbuffers
: PGLuint
);
208 procedure glBindRenderbuffer(target
: GLenum
; renderbuffer
: GLuint
);
209 procedure glRenderbufferStorage(target
, internalformat
: GLenum
; w
, h
: GLsizei
);
210 procedure glDeleteRenderbuffers(n
: GLsizei
; const renderbuffers
: PGLuint
);
212 // procedure glVertexPointer(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer);
213 // procedure glEnableClientState(aarray: GLenum);
214 // procedure glDisableClientState(aarray: GLenum);
215 // procedure glDrawArrays(mode: GLenum; first: GLint; count: GLsizei);
216 // procedure glGetFloatv(pname: GLenum; params: PGLfloat);
217 // procedure glPushAttrib(mask: GLbitfield);
218 // procedure glOrtho(left, right, bottom, top, zNear, zFar: GLdouble);
219 // procedure glPopAttrib;
220 // procedure glColorPointer(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer);
224 function nogl_ExtensionSupported(ext
: string): Boolean;