#define _GRAPHICSBUFFER_H
#include <SDL.h>
-#define GL_GLEXT_PROTOTYPES
-#include <SDL_opengl.h>
+#include "gl_core44.h"
namespace IPDF
{
- /*
+ /**
* Implementation of an OpenGL buffer, with some extra cleverness.
*/
class GraphicsBuffer
void Invalidate();
- void Bind();
+ void Bind() const;
private:
- void RecreateBuffer();
+ bool RecreateBuffer(const void *data = nullptr);
GLuint m_buffer_handle;
BufferType m_buffer_type;
BufferUsage m_buffer_usage;
size_t m_buffer_size;
bool m_invalidated;
bool m_buffer_shape_dirty;
+ bool m_faking_map;
};
}