summaryrefslogtreecommitdiff
path: root/gl.h
blob: a06d6cb03d533d275f1793d738baf5886be3bc5e (plain)
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
#ifndef GL_H
#define GL_H

#include <SFML/Window/OpenGL.hpp>

#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