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
OpenGL 3.1 core profile support.
[ipdf/code.git]
/
src
/
view.h
diff --git
a/src/view.h
b/src/view.h
index
172b5e7
..
3d94a87
100644
(file)
--- a/
src/view.h
+++ b/
src/view.h
@@
-4,6
+4,8
@@
#include "ipdf.h"
#include "document.h"
#include "graphicsbuffer.h"
#include "ipdf.h"
#include "document.h"
#include "graphicsbuffer.h"
+#include "framebuffer.h"
+#include "shaderprogram.h"
namespace IPDF
{
namespace IPDF
{
@@
-11,13
+13,13
@@
namespace IPDF
{
public:
View(Document & document, const Rect & bounds = Rect(0,0,1,1), const Colour & colour = Colour(0.f,0.f,0.f,1.f))
{
public:
View(Document & document, const Rect & bounds = Rect(0,0,1,1), const Colour & colour = Colour(0.f,0.f,0.f,1.f))
- : m_
document(document), m_bounds(bounds), m_colour(colour), m_use_gpu_transform(false), m_bounds_dirty(true)
+ : m_
colour(colour), m_use_gpu_transform(false), m_bounds_dirty(true), m_buffer_dirty(true), m_document(document), m_bounds(bounds)
{
Debug("View Created - Bounds => {%s}", m_bounds.Str().c_str());
}
virtual ~View() {}
{
Debug("View Created - Bounds => {%s}", m_bounds.Str().c_str());
}
virtual ~View() {}
- void Render();
+ void Render(
int width = 0, int height = 0
);
void Translate(Real x, Real y);
void ScaleAroundPoint(Real x, Real y, Real scaleAmt);
void Translate(Real x, Real y);
void ScaleAroundPoint(Real x, Real y, Real scaleAmt);
@@
-27,15
+29,19
@@
namespace IPDF
const Rect& GetBounds() const { return m_bounds; }
const bool UsingGPUTransform() const { return m_use_gpu_transform; }
const Rect& GetBounds() const { return m_bounds; }
const bool UsingGPUTransform() const { return m_use_gpu_transform; }
- void ToggleGPUTransform() { m_use_gpu_transform = (!m_use_gpu_transform); m_bounds_dirty = true; }
+ void ToggleGPUTransform() { m_use_gpu_transform = (!m_use_gpu_transform); m_bounds_dirty = true;
m_buffer_dirty = true;
}
private:
void ReRender();
void DrawGrid();
bool m_use_gpu_transform;
bool m_bounds_dirty;
private:
void ReRender();
void DrawGrid();
bool m_use_gpu_transform;
bool m_bounds_dirty;
+ bool m_buffer_dirty;
+ ShaderProgram m_rect_shader;
+ GraphicsBuffer m_bounds_ubo;
GraphicsBuffer m_vertex_buffer;
GraphicsBuffer m_index_buffer;
GraphicsBuffer m_vertex_buffer;
GraphicsBuffer m_index_buffer;
+ FrameBuffer m_cached_display;
Document & m_document;
Rect m_bounds;
Colour m_colour;
Document & m_document;
Rect m_bounds;
Colour m_colour;
UCC
git Repository :: git.ucc.asn.au