The Build Engine

- Main Page
- Classes
- Files

- File List
- File Members

buildgl.h
1 /*
2 * Experimental OpenGL support code for Build.
3 *
4 * Written by Ryan C. Gordon. (icculus@clutteredmind.org)
5 *
6 * Please do NOT harrass Ken Silverman about any code modifications
7 * (including this file) to BUILD.
8 */
9
10 /*
11 * "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
12 * Ken Silverman's official web site: "http://www.advsys.net/ken"
13 * See the included license file "BUILDLIC.TXT" for license info.
14 * This file IS NOT A PART OF Ken Silverman's original release
15 */
16
17 #ifndef _INCLUDE_BUILDGL_H_
18 #define _INCLUDE_BUILDGL_H_
19
20 #if (!defined USE_OPENGL)
21 #error USE_OPENGL is not defined. Do you REALLY want to compile this?
22 #endif
23
24 #include <GL/gl.h>
25
26 typedef const GLubyte* (*glGetString_t)(GLenum name);
27 extern glGetString_t dglGetString;
28
29 typedef void (*glBegin_t)(GLenum mode);
30 extern glBegin_t dglBegin;
31
32 typedef void (*glEnd_t)(void);
33 extern glEnd_t dglEnd;
34
35 typedef void (*glClear_t)(GLbitfield mask);
36 extern glClear_t dglClear;
37
38 typedef void (*glClearColor_t)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
39 extern glClearColor_t dglClearColor;
40
41 typedef void (*glDrawPixels_t)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
42 extern glDrawPixels_t dglDrawPixels;
43
44 typedef void (*glGetPixelMapfv_t)(GLenum map, GLfloat *values);
45 extern glGetPixelMapfv_t dglGetPixelMapfv;
46
47 typedef void (*glPixelMapfv_t)(GLenum map, GLint mapsize, const GLfloat *values);
48 extern glPixelMapfv_t dglPixelMapfv;
49
50 typedef void (*glPixelStorei_t)(GLenum pname, GLint param);
51 extern glPixelStorei_t dglPixelStorei;
52
53 typedef void (*glEnable_t)(GLenum cap);
54 extern glEnable_t dglEnable;
55
56 typedef void (*glDisable_t)(GLenum cap);
57 extern glDisable_t dglDisable;
58
59 typedef void (*glViewport_t)(GLint x, GLint y, GLsizei width, GLsizei height);
60 extern glViewport_t dglViewport;
61
62 typedef void (*glGenTextures_t)(GLsizei n, GLuint *textures);
63 extern glGenTextures_t dglGenTextures;
64
65 typedef void (*glDeleteTextures_t)(GLsizei n, const GLuint *textures);
66 extern glDeleteTextures_t dglDeleteTextures;
67
68 typedef void (*glBindTexture_t)(GLenum target, GLuint texture);
69 extern glBindTexture_t dglBindTexture;
70
71 typedef void (*glTexParameteri_t)(GLenum target, GLenum pname, GLint param);
72 extern glTexParameteri_t dglTexParameteri;
73
74 typedef void (*glTexImage2D_t)(GLenum target, GLint level,
75 GLint internalFormat, GLsizei width,
76 GLsizei height, GLint border, GLenum format,
77 GLenum type, const GLvoid *pixels);
78 extern glTexImage2D_t dglTexImage2D;
79
80 typedef void (*glTexCoord2f_t)(GLfloat s, GLfloat t);
81 extern glTexCoord2f_t dglTexCoord2f;
82
83 typedef void (*glVertex2f_t)(GLfloat x, GLfloat y);
84 extern glVertex2f_t dglVertex2f;
85
86 typedef void (*glVertex3f_t)(GLfloat x, GLfloat y, GLfloat z);
87 extern glVertex3f_t dglVertex3f;
88
89 typedef void (*glColor3f_t)(GLfloat red, GLfloat green, GLfloat blue);
90 extern glColor3f_t dglColor3f;
91
92 typedef GLenum (*glGetError_t)(void);
93 extern glGetError_t dglGetError;
94
95 typedef void (*glGetIntegerv_t)(GLenum pname, GLint *params);
96 extern glGetIntegerv_t dglGetIntegerv;
97
98 typedef void (*glClearDepth_t)(GLclampd depth);
99 extern glClearDepth_t dglClearDepth;
100
101 typedef void (*glDepthFunc_t)(GLenum func);
102 extern glDepthFunc_t dglDepthFunc;
103
104 typedef void (*glShadeModel_t)(GLenum mode);
105 extern glShadeModel_t dglShadeModel;
106
107 typedef void (*glMatrixMode_t)(GLenum mode);
108 extern glMatrixMode_t dglMatrixMode;
109
110 typedef void (*glLoadIdentity_t)(void);
111 extern glLoadIdentity_t dglLoadIdentity;
112
113 typedef void (*glPixelTransferi_t)(GLenum pname, GLint param);
114 extern glPixelTransferi_t dglPixelTransferi;
115
116 int opengl_load_library(void);
117 void opengl_gen_2d_textures(int xdim, int ydim);
118 void opengl_build_2d_quads(int x, int y, int w, int h);
119 void opengl_swapbuffers(void);
120
121 #endif /* !defined _INCLUDE_BUILDGL_H_ */
122
123 /* end of buildgl.h ... */
124