DEADSOFTWARE

added optional framebuffer and resolution scaling
[d2df-sdl.git] / src / nogl / noGL.pas
1 {$INCLUDE ../shared/a_modes.inc}
2 unit noGL;
4 interface
6 uses ctypes;
8 type
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;
27 TGLenum = GLenum;
28 TGLboolean = GLboolean;
29 TGLbitfield = GLbitfield;
30 TGLbyte = GLbyte;
31 TGLshort = GLshort;
32 TGLint = GLint;
33 TGLsizei = GLsizei;
34 TGLubyte = GLubyte;
35 TGLushort = GLushort;
36 TGLuint = GLuint;
37 TGLfloat = GLfloat;
38 TGLclampf = GLclampf;
39 TGLdouble = GLdouble;
40 TGLclampd = GLclampd;
41 TGLfixed = GLfixed;
42 TGLclampx = GLclampx;
44 const
45 GL_NEAREST = $2600;
46 GL_DEPTH_TEST = $0B71;
47 GL_SCISSOR_TEST = $0C11;
48 GL_MODELVIEW = $1700;
49 GL_PROJECTION = $1701;
50 GL_BLEND = $0BE2;
51 GL_SRC_ALPHA = $0302;
52 GL_ONE_MINUS_SRC_ALPHA = $0303;
53 GL_ONE = $1;
54 GL_TEXTURE_2D = $0DE1;
55 GL_QUADS = $0007;
56 GL_ZERO = $0;
57 GL_POINTS = $0000;
58 GL_LINES = $0001;
59 GL_DST_COLOR = $0306;
60 GL_SRC_COLOR = $0300;
61 GL_ONE_MINUS_DST_COLOR = $0307;
62 GL_GREATER = $0204;
63 GL_COLOR_BUFFER_BIT = $00004000;
64 GL_RGB = $1907;
65 GL_UNSIGNED_BYTE = $1401;
66 GL_ALPHA_TEST = $0BC0;
67 GL_VIEWPORT = $0BA2;
68 GL_TEXTURE_WRAP_S = $2802;
69 GL_TEXTURE_WRAP_T = $2803;
70 GL_REPEAT = $2901;
71 GL_TEXTURE_MIN_FILTER = $2801;
72 GL_TEXTURE_MAG_FILTER = $2800;
73 GL_RGBA = $1908;
74 GL_POINT_SMOOTH = $0B10;
75 GL_STENCIL_TEST = $0B90;
76 GL_SCISSOR_BOX = $0C10;
77 GL_FALSE = $0;
78 GL_TRUE = $1;
79 GL_ALWAYS = $0207;
80 GL_STENCIL_BUFFER_BIT = $00000400;
81 GL_EQUAL = $0202;
82 GL_KEEP = $1E00;
83 GL_INCR = $1E02;
84 GL_LINEAR = $2601;
85 GL_TEXTURE_ENV = $2300;
86 GL_TEXTURE_ENV_MODE = $2200;
87 GL_MODULATE = $2100;
89 GL_VENDOR = $1F00;
90 GL_RENDERER = $1F01;
91 GL_VERSION = $1F02;
92 GL_EXTENSIONS = $1F03;
93 GL_SHADING_LANGUAGE_VERSION = $8B8C;
95 // const
96 // GL_CULL_FACE = $0B44;
97 // GL_FLOAT = $1406;
98 // GL_VERTEX_ARRAY = $8074;
99 // GL_NORMAL_ARRAY = $8075;
100 // GL_COLOR_ARRAY = $8076;
101 // GL_TEXTURE_COORD_ARRAY = $8078;
102 // GL_NOTEQUAL = $0205;
103 // GL_LINE_SMOOTH = $0B20;
104 // GL_POLYGON_SMOOTH = $0B41;
105 // GL_LIGHTING = $0B50;
106 // GL_DITHER = $0BD0;
107 // GL_MODELVIEW_MATRIX = $0BA6;
108 // GL_MATRIX_MODE = $0BA0;
109 // GL_TEXTURE_BINDING_2D = $8069;
110 // GL_TEXTURE = $1702;
111 // GL_COLOR = $1800;
112 // GL_ALL_ATTRIB_BITS = $000FFFFF;
114 procedure glEnable(cap: GLenum);
115 procedure glDisable(cap: GLenum);
116 function glIsEnabled(cap: GLenum): GLboolean;
117 function glGetString(name: GLenum): PChar;
118 procedure glClearColor(red, green, blue, alpha: GLclampf);
119 procedure glClear(mask: GLbitfield);
120 procedure glAlphaFunc(func: GLenum; ref: GLclampf);
121 procedure glBlendFunc(sfactor, dfactor: GLenum);
122 procedure glPointSize(size: GLfloat);
123 procedure glLineWidth(width: GLfloat);
124 procedure glGetIntegerv(pname: GLenum; params: PGLint);
125 procedure glFlush;
126 procedure glFinish;
128 procedure glBegin(mode: GLenum);
129 procedure glEnd;
130 procedure glTexCoord2f(s, t: GLfloat);
131 procedure glVertex2i(x, y: GLint);
132 procedure glColor4ub(red, green, blue, alpha: GLubyte);
133 procedure glColor3ub(red, green, blue: GLubyte);
134 procedure glVertex2f(x, y: GLfloat);
135 procedure glTexCoord2i(s, t: GLint);
136 procedure glColor4f(red, green, blue, alpha: GLfloat);
138 procedure glReadPixels(x, y: GLint; width, height: GLsizei; format, atype: GLenum; pixels: Pointer);
140 procedure glLoadIdentity;
141 procedure glScissor(x, y: GLint; width, height: GLsizei);
142 procedure glViewport(x, y: GLint; width, height: GLsizei);
143 procedure glMatrixMode(mode: GLenum);
144 procedure glLoadMatrixd(const m: PGLdouble);
145 procedure glPushMatrix;
146 procedure glTranslatef(x, y, z: GLfloat);
147 procedure glRotatef(angle, x, y, z: GLfloat);
148 procedure glScalef(x, y, z: GLfloat);
149 procedure glPopMatrix;
151 procedure glStencilMask(mask: GLuint);
152 procedure glStencilFunc(func: GLenum; ref: GLint; mask: GLuint);
153 procedure glStencilOp(fail, zfail, zpass: GLenum);
154 procedure glColorMask(red, green, blue, alpha: GLboolean);
156 procedure glBindTexture(target: GLenum; texture: GLuint);
157 procedure glGenTextures(n: GLsizei; textures: PGLuint);
158 procedure glTexEnvi(target: GLenum; pname: GLenum; param: GLint);
159 procedure glTexParameterf(target: GLenum; pname: GLenum; param: GLfloat);
160 procedure glTexParameteri(target: GLenum; pname: GLenum; param: GLint);
161 procedure glTexImage2D(target: GLenum; level, internalformat: GLint; width, height: GLsizei; border: GLint; format, atype: GLenum; const pixels: Pointer);
162 procedure glTexSubImage2D(target: GLenum; level, xoffset, yoffset: GLint; width, height: GLsizei; format, atype: GLenum; const pixels: Pointer);
163 procedure glDeleteTextures(n: GLsizei; const textures: PGLuint);
165 // procedure glVertexPointer(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer);
166 // procedure glEnableClientState(aarray: GLenum);
167 // procedure glDisableClientState(aarray: GLenum);
168 // procedure glDrawArrays(mode: GLenum; first: GLint; count: GLsizei);
169 // procedure glGetFloatv(pname: GLenum; params: PGLfloat);
170 // procedure glPushAttrib(mask: GLbitfield);
171 // procedure glOrtho(left, right, bottom, top, zNear, zFar: GLdouble);
172 // procedure glPopAttrib;
173 // procedure glColorPointer(size: GLint; atype: GLenum; stride: GLsizei; const pointer: Pointer);
175 procedure nogl_Init;
176 procedure nogl_Quit;
178 {$IFDEF USE_GLES1}
179 {$I noGLES1.inc}
180 {$ENDIF}
181 {$IFDEF USE_GLSTUB}
182 {$I noGLSTUB.inc}
183 {$ENDIF}
185 end.