#ifndef USE_OPENGL #define BUILD_GL32 #include "stub_opengl.h" #include #if !defined(__WIN32__) #undef GLAPI #define GLAPI #endif GLAPI void GLAPIENTRY glBegin(GLenum mode) { } GLAPI void GLAPIENTRY glEnd(void) { } GLAPI void GLAPIENTRY glEnable(GLenum cap) { } GLAPI void GLAPIENTRY glDisable(GLenum cap) { } GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor) { } GLAPI void GLAPIENTRY glMatrixMode(GLenum mode) { } GLAPI void GLAPIENTRY glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val) { } GLAPI void GLAPIENTRY glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val) { } GLAPI void GLAPIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { } GLAPI void GLAPIENTRY glPushMatrix(void) { } GLAPI void GLAPIENTRY glPopMatrix(void) { } GLAPI void GLAPIENTRY glLoadIdentity(void) { } GLAPI void GLAPIENTRY glMultMatrixf(const GLfloat *m) { } GLAPI void GLAPIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { } GLAPI void GLAPIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z) { } GLAPI void GLAPIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z) { } GLAPI void GLAPIENTRY glVertex2f(GLfloat x, GLfloat y) { } GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z) { } GLAPI void GLAPIENTRY glVertex3fv(const GLfloat *v) { } GLAPI void GLAPIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue) { } GLAPI void GLAPIENTRY glColor3fv(const GLfloat *v) { } GLAPI void GLAPIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { } GLAPI void GLAPIENTRY glColor4fv(const GLfloat *v) { } GLAPI void GLAPIENTRY glColor4ubv(const GLubyte *v) { } GLAPI void GLAPIENTRY glTexCoord2f(GLfloat s, GLfloat t) { } GLAPI void GLAPIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param) { } GLAPI void GLAPIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param) { } GLAPI void GLAPIENTRY glFogf(GLenum pname, GLfloat param) { } GLAPI void GLAPIENTRY glFogi(GLenum pname, GLint param) { } GLAPI void GLAPIENTRY glFogfv(GLenum pname, const GLfloat *params) { } GLAPI void GLAPIENTRY glDepthFunc(GLenum func) { } GLAPI void GLAPIENTRY glDepthMask(GLboolean flag) { } GLAPI void GLAPIENTRY glDepthRange(GLclampd near_val, GLclampd far_val) { } GLAPI void GLAPIENTRY glShadeModel(GLenum mode) { } GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { } GLAPI void GLAPIENTRY glClear(GLbitfield mask) { } GLAPI void GLAPIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { } GLAPI void GLAPIENTRY glPolygonMode(GLenum face, GLenum mode) { } GLAPI void GLAPIENTRY glPolygonOffset(GLfloat factor, GLfloat units) { } GLAPI void GLAPIENTRY glFinish(void) { } GLAPI void GLAPIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask) { } GLAPI void GLAPIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) { } GLAPI void GLAPIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param) { } GLAPI void GLAPIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param) { } GLAPI void GLAPIENTRY glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { } GLAPI void GLAPIENTRY glGenTextures(GLsizei n, GLuint *textures) { memset(textures, 0, sizeof(GLuint) * n); } GLAPI void GLAPIENTRY glDeleteTextures(GLsizei n, const GLuint *textures) { } GLAPI void GLAPIENTRY glBindTexture(GLenum target, GLuint texture) { } GLAPI void GLAPIENTRY glPixelStorei(GLenum pname, GLint param) { } GLAPI void GLAPIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) { int stride, sz; switch (format) { case GL_RGB: stride = 3; break; case GL_RGBA: stride = 4; break; default: stride = 0; break; } switch (type) { case GL_UNSIGNED_BYTE: sz = sizeof(unsigned char); break; default: sz = 0; break; } memset(pixels, 0, width * height * sz * stride); } GLAPI void GLAPIENTRY glGetIntegerv(GLenum pname, GLint *params) { *params = 0; } GLAPI void GLAPIENTRY glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels) { // No way to figure out texture dimensions from just these parameters, so ignore } GLAPI void GLAPIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { } GLAPI void GLAPIENTRY glHint(GLenum target, GLenum mode) { } GLAPI void GLAPIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) { } GLAPI void GLAPIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) { } GLAPI void GLAPIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { } GLAPI void GLAPIENTRY GL_MTexCoord2fFunc(GLenum target, GLfloat s, GLfloat t) { } GLAPI void GLAPIENTRY GL_SelectTextureFunc(GLenum target) { } #endif // !USE_OPENGL