[core] remove unused GL_TRACK functions

This commit is contained in:
Konstantin Käfer
2016-09-28 15:07:53 +02:00
parent aa0fc68fea
commit a8b007daa0
2 changed files with 0 additions and 245 deletions

View File

@@ -1,15 +1,9 @@
#pragma once
//#define GL_TRACK
#include <string>
#include <stdexcept>
#include <vector>
#ifdef GL_TRACK
#include <iostream>
#endif
#if __APPLE__
#include "TargetConditionals.h"
#if TARGET_OS_IPHONE
@@ -38,28 +32,6 @@
namespace mbgl {
namespace gl {
#ifdef GL_TRACK
typedef void (*GLDEBUGPROC)(GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *message,
const void *userParam);
template <class... Args> void mbx_trapExtension(const char *name, Args... args);
void mbx_trapExtension(const char *);
void mbx_trapExtension(const char *, GLint, const char *);
void mbx_trapExtension(const char *, GLsizei, GLuint *);
void mbx_trapExtension(const char *, GLsizei, const GLuint *);
void mbx_trapExtension(const char *, GLenum, GLenum, GLenum, GLsizei, const GLuint *, GLboolean);
void mbx_trapExtension(const char *, GLenum, GLuint, GLsizei, const GLchar *);
void mbx_trapExtension(const char *, GLDEBUGPROC, const void *);
void mbx_trapExtension(const char *, GLuint, GLuint, GLuint, GLuint, GLint, const char *, const void*);
void mbx_trapExtension(const char *name, GLuint array);
#endif
struct Error : std::runtime_error {
using std::runtime_error::runtime_error;
};
@@ -78,9 +50,6 @@ public:
typedef std::pair<const char *, const char *> Probe;
std::vector<Probe> probes;
void (*ptr)();
#ifdef GL_TRACK
const char *foundName;
#endif
};
template <class>
@@ -99,9 +68,6 @@ public:
}
R operator()(Args... args) const {
#ifdef GL_TRACK
mbx_trapExtension(foundName, args...);
#endif
return (*reinterpret_cast<R (*)(Args...)>(ptr))(std::forward<Args>(args)...);
}
};
@@ -125,41 +91,3 @@ extern ExtensionFunction<void (GLsizei n, GLuint* arrays)>
#define glClearDepth glClearDepthf
#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