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
|
#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
|