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