summaryrefslogtreecommitdiff
path: root/include/mbgl/platform
diff options
context:
space:
mode:
authorAdam Hunter <adam@mapbox.com>2015-09-17 14:10:18 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-09-29 15:07:39 -0700
commit3f9f2596190c4dbf87425d793a8d51a75547ba89 (patch)
treed3ee1bc33e6ad5e84363f792f1187f9c53710ef1 /include/mbgl/platform
parent6d357eb0c87897ef99926a4b2b12d0ae3354e7d8 (diff)
downloadqtlocation-mapboxgl-3f9f2596190c4dbf87425d793a8d51a75547ba89.tar.gz
Added GL logging utility
Diffstat (limited to 'include/mbgl/platform')
-rw-r--r--include/mbgl/platform/gl.hpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/mbgl/platform/gl.hpp b/include/mbgl/platform/gl.hpp
index 6bcb85fee7..1e3f13427b 100644
--- a/include/mbgl/platform/gl.hpp
+++ b/include/mbgl/platform/gl.hpp
@@ -1,6 +1,8 @@
#ifndef MBGL_RENDERER_GL
#define MBGL_RENDERER_GL
+//#define GL_TRACK
+
#include <string>
#include <stdexcept>
#include <vector>
@@ -84,4 +86,42 @@ void InitializeExtensions(glProc (*getProcAddress)(const char *));
#define glDepthRange glDepthRangef
#endif
+#ifdef GL_TRACK
+#define glBindTexture mbx_glBindTexture
+#define glDeleteTexture mbx_glDeleteTexture
+#define glTexImage2D mbx_glTexImage2D
+#define glClear mbx_glClear
+#define glShaderSource mbx_glShaderSource
+#define glBufferData mbx_glBufferData
+#define glBindBuffer mbx_glBindBuffer
+#define glDeleteBuffers mbx_glDeleteBuffers
+
+void mbx_glDeleteBuffers(GLsizei n,
+ const GLuint * buffers);
+void mbx_glBindBuffer(GLenum target,
+ GLuint buffer);
+void mbx_glBufferData(GLenum target,
+ GLsizeiptr size,
+ const GLvoid * data,
+ GLenum usage);
+void mbx_glShaderSource(GLuint shader,
+ GLsizei count,
+ const GLchar * const *string,
+ const GLint *length);
+void mbx_glClear(GLbitfield mask);
+void mbx_glBindTexture( GLenum target,
+ GLuint texture);
+void mbx_glDeleteTextures(GLsizei n,
+ const GLuint * textures);
+void mbx_glTexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const GLvoid * data);
+#endif
+
#endif