1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#ifndef GL_H
#define GL_H
#ifndef WIN32
#define GL_GLEXT_PROTOTYPES
#endif
#include <SDL_opengl.h>
#ifdef WIN32
/* buffer */
extern void (APIENTRY *glGenBuffers)(GLsizei, GLuint*);
extern void (APIENTRY *glDeleteBuffers)(GLsizei, GLuint*);
extern void (APIENTRY *glBindBuffer)(GLenum, GLuint);
extern void (APIENTRY *glBufferData)(GLenum, GLsizeiptr, const GLvoid*, GLenum);
extern GLvoid* (APIENTRY *glMapBuffer)(GLenum, GLenum);
extern GLboolean (APIENTRY *glUnmapBuffer)(GLenum);
/* uniform */
extern GLint (APIENTRY *glGetUniformLocation)(GLuint, const GLchar*);
extern void (APIENTRY *glUniform1i)(GLint, GLint);
extern void (APIENTRY *glUniform1f)(GLint, GLfloat);
extern void (APIENTRY *glUniform2f)(GLint, GLfloat, GLfloat);
extern void (APIENTRY *glUniform3f)(GLint, GLfloat, GLfloat, GLfloat);
extern void (APIENTRY *glUniform1iv)(GLint, GLsizei, const GLint*);
/* texture */
extern void (APIENTRY *glActiveTexture)(GLenum);
/* 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
|