-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglcontext.hpp
52 lines (44 loc) · 2.04 KB
/
glcontext.hpp
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 __Noise__glcontext__
#define __Noise__glcontext__
#include "utilities.hpp"
#include <string>
class glcontext {
public:
glcontext(SDL_Window *win);
~glcontext();
void makeCurrent(SDL_Window *win);
glcontext(glcontext const &gl) = delete;
void operator=(glcontext const &gl) = delete;
void setTextureGrayscale(GLuint texture, SDL_Surface *surface);
const std::string getGLSLVersion();
const PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation = nullptr;
const PFNGLGETATTRIBLOCATIONPROC GetAttribLocation = nullptr;
const PFNGLGENVERTEXARRAYSPROC GenVertexArrays = nullptr;
const PFNGLDELETEVERTEXARRAYSPROC DeleteVertexArrays = nullptr;
const PFNGLGENBUFFERSPROC GenBuffers = nullptr;
const PFNGLDELETEBUFFERSPROC DeleteBuffers = nullptr;
const PFNGLBINDVERTEXARRAYPROC BindVertexArray = nullptr;
const PFNGLUSEPROGRAMPROC UseProgram = nullptr;
const PFNGLBUFFERDATAPROC BufferData = nullptr;
const PFNGLENABLEVERTEXATTRIBARRAYPROC EnableVertexAttribArray = nullptr;
const PFNGLVERTEXATTRIBPOINTERPROC VertexAttribPointer = nullptr;
const PFNGLACTIVETEXTUREPROC ActiveTexture = nullptr;
const PFNGLUNIFORM1UIPROC Uniform1ui = nullptr;
const PFNGLUNIFORM1IPROC Uniform1i = nullptr;
const PFNGLCREATESHADERPROC CreateShader = nullptr;
const PFNGLSHADERSOURCEPROC ShaderSource = nullptr;
const PFNGLCOMPILESHADERPROC CompileShader = nullptr;
const PFNGLDELETESHADERPROC DeleteShader = nullptr;
const PFNGLGETSHADERIVPROC GetShaderiv = nullptr;
const PFNGLGETSHADERINFOLOGPROC GetShaderInfoLog = nullptr;
const PFNGLCREATEPROGRAMPROC CreateProgram = nullptr;
const PFNGLATTACHSHADERPROC AttachShader = nullptr;
const PFNGLLINKPROGRAMPROC LinkProgram = nullptr;
const PFNGLGETPROGRAMIVPROC GetProgramiv = nullptr;
const PFNGLGETPROGRAMINFOLOGPROC GetProgramInfoLog = nullptr;
const PFNGLBINDBUFFERPROC BindBuffer = nullptr;
private:
SDL_GLContext gl;
const bool isCore = true;
};
#endif /* defined(__Noise__glcontext__) */