git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor perf improvement on nVidia
[ipdf/code.git]
/
src
/
graphicsbuffer.h
diff --git
a/src/graphicsbuffer.h
b/src/graphicsbuffer.h
index
d74d344
..
dd25617
100644
(file)
--- a/
src/graphicsbuffer.h
+++ b/
src/graphicsbuffer.h
@@
-2,14
+2,13
@@
#define _GRAPHICSBUFFER_H
#include <SDL.h>
#define _GRAPHICSBUFFER_H
#include <SDL.h>
-#define GL_GLEXT_PROTOTYPES
-#include <SDL_opengl.h>
+#include "gl_core44.h"
namespace IPDF
{
/*
namespace IPDF
{
/*
- *
The "Screen" class handles managing the OS window (using SDL2)
.
+ *
Implementation of an OpenGL buffer, with some extra cleverness
.
*/
class GraphicsBuffer
{
*/
class GraphicsBuffer
{
@@
-53,15
+52,20
@@
namespace IPDF
void Resize(size_t length);
const size_t GetSize() const { return m_buffer_size; }
void Resize(size_t length);
const size_t GetSize() const { return m_buffer_size; }
+
+ void Invalidate();
- void Bind();
+ void Bind()
const
;
private:
private:
+ bool RecreateBuffer(const void *data = nullptr);
GLuint m_buffer_handle;
BufferType m_buffer_type;
BufferUsage m_buffer_usage;
void *m_map_pointer;
size_t m_buffer_size;
bool m_invalidated;
GLuint m_buffer_handle;
BufferType m_buffer_type;
BufferUsage m_buffer_usage;
void *m_map_pointer;
size_t m_buffer_size;
bool m_invalidated;
+ bool m_buffer_shape_dirty;
+ bool m_faking_map;
};
}
};
}
UCC
git Repository :: git.ucc.asn.au