From 578ad89703ef74539e74edc86f865064763882fb Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 29 Jan 2012 11:46:11 +0100 Subject: Import shader functions for win32. --- gl.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'gl.h') diff --git a/gl.h b/gl.h index 87d321b..a06d6cb 100644 --- a/gl.h +++ b/gl.h @@ -3,4 +3,37 @@ #include +#ifdef WIN32 +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_CLAMP_TO_EDGE 0x812F + +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 + +#define GLchar char + +/* program/shader */ +extern GLuint (APIENTRY *glCreateProgram)(void); +extern void (APIENTRY *glLinkProgram)(GLuint); +extern void (APIENTRY *glGetProgramiv)(GLuint, GLenum, GLint*); +extern void (APIENTRY *glGetProgramInfoLog)(GLuint, GLsizei, GLsizei*, GLchar*); +extern void (APIENTRY *glUseProgram)(GLuint); +extern void (APIENTRY *glDeleteProgram)(GLuint); + +extern GLuint (APIENTRY *glCreateShader)(GLenum); +extern void (APIENTRY *glShaderSource)(GLuint, GLsizei, const GLchar**, const GLint*); +extern void (APIENTRY *glCompileShader)(GLuint); +extern void (APIENTRY *glGetShaderiv)(GLuint, GLenum, GLint*); +extern void (APIENTRY *glGetShaderInfoLog)(GLuint, GLsizei, GLsizei*, GLchar*); + +extern void (APIENTRY *glAttachShader)(GLuint, GLuint); +extern void (APIENTRY *glDetachShader)(GLuint, GLuint); +extern void (APIENTRY *glDeleteShader)(GLuint); + +void win32_gl_init(); +#endif + #endif -- cgit v1.2.3