X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fview.h;h=05be33e4e3dde36bf0983ffad22193ddc766064d;hp=0359565c1d939f7b33a7057189571b9d32adc749;hb=6c0dfe752994312ee58d307b383948bfeb2d6e2e;hpb=a54254dcb23c8db9b78d5bd42e1ca54efda4c8e8 diff --git a/src/view.h b/src/view.h index 0359565..05be33e 100644 --- a/src/view.h +++ b/src/view.h @@ -8,22 +8,16 @@ #include "path.h" #include "transformationtype.h" -#define USE_GPU_TRANSFORM true +#define USE_GPU_TRANSFORM false #define USE_GPU_RENDERING true #define USE_SHADING !(USE_GPU_RENDERING) && true -#ifdef TRANSFORM_BEZIERS_TO_PATH + #include "gmprat.h" -#include "paranoidnumber.h" -#endif + namespace IPDF { - #ifdef TRANSFORM_BEZIERS_TO_PATH - typedef ParanoidNumber VReal; - #else - typedef Real VReal; - #endif typedef TRect VRect; class Screen; @@ -73,6 +67,8 @@ namespace IPDF void ForceBufferDirty() {m_buffer_dirty = true;} void ForceRenderDirty() {m_render_dirty = true;} + void QueryGPUBounds(const char * filename, const char * mode="r"); + void SetLazyRendering(bool state = true) {m_lazy_rendering = state;} bool UsingLazyRendering() const {return m_lazy_rendering;} @@ -89,6 +85,8 @@ namespace IPDF float x0, y0; float x1, y1; } __attribute__((packed)); + + void PrepareRender(); // call when m_render_dirty is true void UpdateObjBoundsVBO(unsigned first_obj, unsigned last_obj); // call when m_buffer_dirty is true @@ -127,6 +125,8 @@ namespace IPDF bool m_show_fill_bounds; bool m_lazy_rendering;// don't redraw frames unless we need to + + FILE * m_query_gpu_bounds_on_next_frame; #ifndef QUADTREE_DISABLED