UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
opengl.h
Go to the documentation of this file.
1 #ifndef UGDK_INTERNAL_OPENGL_H_
2 #define UGDK_INTERNAL_OPENGL_H_
3 
4 #ifdef UGDK_USING_GLES
5 
6 #include <GLES2/gl2.h>
7 
8 #else
9 
10 #include <GL/glew.h>
11 
12 #ifndef UGDK_OPENGL_IGNORE_VBO
13 #define UGDK_OPENGL_USE_VBO
14 #endif
15 
16 #endif
17 
18 #include <cassert>
19 
20 namespace ugdk {
21 namespace internal {
22 
23 inline void AssertNoOpenGLError() {
24 #ifndef NDEBUG
25  auto err = glGetError();
26  assert(GL_NO_ERROR == err);
27 #endif
28 }
29 
30 inline void ClearOpenGLErrors() {
31 #ifndef NDEBUG
32  while (GL_NO_ERROR != glGetError());
33 #endif
34 }
35 
36 }
37 }
38 
39 #endif // UGDK_INTERNAL_SDLEVENTHANDLER_H_
Definition: animation.h:11
void AssertNoOpenGLError()
Definition: opengl.h:23
void ClearOpenGLErrors()
Definition: opengl.h:30