X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fview.h;h=f1ac789cdb79e03deaeb4c9f246fa314329a75a9;hp=1cb2221c0e21fdd59b6be7857f09b9f480faa229;hb=f28146cf72fc68c8d3690814b1f89d47b8c4e7b9;hpb=6b7e92069596a3f19fbe068b14a9c5ef59c22061 diff --git a/src/view.h b/src/view.h index 1cb2221..f1ac789 100644 --- a/src/view.h +++ b/src/view.h @@ -12,14 +12,14 @@ #define USE_GPU_RENDERING true #define USE_SHADING !(USE_GPU_RENDERING) && true -#ifdef TRANSFORM_BEZIERS_TO_PATH + #include "gmprat.h" -#endif + namespace IPDF { #ifdef TRANSFORM_BEZIERS_TO_PATH - typedef Gmprat VReal; + typedef Real VReal; #else typedef Real VReal; #endif @@ -72,6 +72,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;} @@ -81,6 +83,9 @@ namespace IPDF void SaveGPUBMP(const char * filename); Document & Doc() {return m_document;} +#ifndef QUADTREE_DISABLED + QuadTreeIndex GetCurrentQuadtreeNode() { return m_current_quadtree_node; } +#endif private: struct GPUObjBounds @@ -88,6 +93,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 @@ -126,6 +133,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