diff options
Diffstat (limited to 'wrappers/gltrace.hpp')
-rw-r--r-- | wrappers/gltrace.hpp | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/wrappers/gltrace.hpp b/wrappers/gltrace.hpp index e8f6f7e4..d55d8a39 100644 --- a/wrappers/gltrace.hpp +++ b/wrappers/gltrace.hpp @@ -26,10 +26,6 @@ #pragma once -#include <string.h> -#include <stdlib.h> -#include <map> - #include "glimports.hpp" #include "glfeatures.hpp" @@ -38,51 +34,6 @@ namespace gltrace { -/** - * OpenGL ES buffers cannot be read. This class is used to track index buffer - * contents. - */ -class Buffer { -public: - GLsizeiptr size; - GLvoid *data; - - Buffer() : - size(0), - data(0) - {} - - ~Buffer() { - free(data); - } - - void - bufferData(GLsizeiptr new_size, const void *new_data) { - if (new_size < 0) { - new_size = 0; - } - size = new_size; - data = realloc(data, new_size); - if (new_size && new_data) { - memcpy(data, new_data, size); - } - } - - void - bufferSubData(GLsizeiptr offset, GLsizeiptr length, const void *new_data) { - if (offset >= 0 && offset < size && length > 0 && offset + length <= size && new_data) { - memcpy((GLubyte *)data + offset, new_data, length); - } - } - - void - getSubData(GLsizeiptr offset, GLsizeiptr length, void *out_data) { - if (offset >= 0 && offset < size && length > 0 && offset + length <= size && out_data) { - memcpy(out_data, (GLubyte *)data + offset, length); - } - } -}; - class Context { public: glfeatures::Profile profile; @@ -99,18 +50,9 @@ public: // Whether it has been bound to a drawable bool boundDrawable = false; - // TODO: This will fail for buffers shared by multiple contexts. - std::map <GLuint, Buffer> buffers; - Context(void) : profile(glfeatures::API_GL, 1, 0) { } - - inline bool - needsShadowBuffers(void) - { - return profile.es(); - } }; void |