Minor perf improvement on nVidia
[ipdf/code.git] / src / graphicsbuffer.h
index 47534c9..dd25617 100644 (file)
@@ -2,8 +2,7 @@
 #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
@@ -56,9 +55,9 @@ namespace IPDF
 
                void Invalidate();
                
 
                void Invalidate();
                
-               void Bind();
+               void Bind() const;
        private:
        private:
-               void RecreateBuffer();
+               bool RecreateBuffer(const void *data = nullptr);
                GLuint m_buffer_handle;
                BufferType m_buffer_type;
                BufferUsage m_buffer_usage;
                GLuint m_buffer_handle;
                BufferType m_buffer_type;
                BufferUsage m_buffer_usage;
@@ -66,6 +65,7 @@ namespace IPDF
                size_t m_buffer_size;
                bool m_invalidated;
                bool m_buffer_shape_dirty;
                size_t m_buffer_size;
                bool m_invalidated;
                bool m_buffer_shape_dirty;
+               bool m_faking_map;
        };
 
 }
        };
 
 }

UCC git Repository :: git.ucc.asn.au