summaryrefslogtreecommitdiff
path: root/gl.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl.h')
-rw-r--r--gl.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/gl.h b/gl.h
index bb28c20..575a0ec 100644
--- a/gl.h
+++ b/gl.h
@@ -1,7 +1,49 @@
#ifndef GL_H
#define GL_H
+#ifndef WIN32
#define GL_GLEXT_PROTOTYPES
+#endif
+
#include <SDL_opengl.h>
+#ifdef WIN32
+/* buffer */
+extern void (*glGenBuffers)(GLsizei, GLuint*);
+extern void (*glDeleteBuffers)(GLsizei, GLuint*);
+extern void (*glBindBuffer)(GLenum, GLuint);
+extern void (*glBufferData)(GLenum, GLsizeiptr, const GLvoid*, GLenum);
+extern GLvoid* (*glMapBuffer)(GLenum, GLenum);
+extern GLboolean (*glUnmapBuffer)(GLenum);
+
+/* uniform */
+extern GLint (*glGetUniformLocation)(GLuint, const GLchar*);
+extern void (*glUniform1i)(GLint, GLint);
+extern void (*glUniform3f)(GLint, GLfloat, GLfloat, GLfloat);
+
+/* texture */
+extern void (*glActiveTexture)(GLenum);
+
+/* program/shader */
+extern GLuint (*glCreateProgram)(void);
+extern void (*glLinkProgram)(GLuint);
+extern void (*glGetProgramiv)(GLuint, GLenum, GLint*);
+extern void (*glGetProgramInfoLog)(GLuint, GLsizei, GLsizei*, GLchar*);
+extern void (*glUseProgram)(GLuint);
+extern void (*glDeleteProgram)(GLuint);
+
+extern GLuint (*glCreateShader)(GLenum);
+extern void (*glShaderSource)(GLuint, GLsizei, const GLchar**, const GLint*);
+extern void (*glCompileShader)(GLuint);
+extern void (*glGetShaderiv)(GLuint, GLenum, GLint*);
+extern void (*glGetShaderInfoLog)(GLuint, GLsizei, GLsizei*, GLchar*);
+
+extern void (*glAttachShader)(GLuint, GLuint);
+extern void (*glDetachShader)(GLuint, GLuint);
+extern void (*glDeleteShader)(GLuint);
+
+void win32_gl_init();
+#endif
+
+
#endif