jGL
Loading...
Searching...
No Matches
gl.h
Go to the documentation of this file.
1#ifndef GL_H
2#define GL_H
3
4#ifdef ANDROID
5
6/*
7
8https://developer.android.com/ndk/guides/stable_apis
9
10 OpenGL ES 1.0 - 3.2
11
12 The standard OpenGL ES 1.x headers (<GLES/gl.h> and <GLES/glext.h>),
13 2.0 headers (<GLES2/gl2.h> and <GLES2/gl2ext.h>),
14 3.0 headers (<GLES3/gl3.h> and <GLES3/gl3ext.h>),
15 3.1 headers (<GLES3/gl31.h> and <GLES3/gl3ext.h>), and
16 3.2 headers (<GLES3/gl32.h> and <GLES3/gl3ext.h>) contain the declarations necessary for OpenGL ES.
17
18*/
19
20#include <GLES3/gl31.h>
21
22#else
23
24#ifdef _WIN32
25#ifndef GLEW_STATIC
26#define GLEW_STATIC
27#endif
28#endif
29
30#include <GL/glew.h>
31
32#endif
33
34#include <glm/glm.hpp>
35#include <glm/gtc/matrix_transform.hpp>
36
37#include <exception>
38#include <string>
39
40namespace jGL::GL
41{
42
43 class GLRuntimeException: public std::exception
44 {
45
46 public:
47
48 GLRuntimeException(std::string msg)
49 : msg(msg)
50 {}
51
52 private:
53
54 virtual const char * what() const throw()
55 {
56 return msg.c_str();
57 }
58
59 std::string msg;
60
61 };
62 // print buffer status errors
63 GLuint glBufferStatus(const std::string msg = "");
64 // print gl error codes
65 GLuint glError(const std::string msg = "");
66}
67#endif
Definition gl.h:44
GLRuntimeException(std::string msg)
Definition gl.h:48
Definition gl.h:41
GLuint glError(const std::string msg="")
Definition gl.cpp:35
GLuint glBufferStatus(const std::string msg="")
Definition gl.cpp:7