X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fobjectrenderer.h;h=60cba6c03605b76ea5f5945e0b67a49da9de9f86;hp=4ebb66a2186e9d0669c410893da8c7febebec42c;hb=47c305b00cc92169d826b0ca5268c92b1d019e28;hpb=09fc4981be389620d3c269beacf0630de45871bb diff --git a/src/objectrenderer.h b/src/objectrenderer.h index 4ebb66a..60cba6c 100644 --- a/src/objectrenderer.h +++ b/src/objectrenderer.h @@ -34,7 +34,7 @@ namespace IPDF * Use the GPU to render the objects - GLSL shader approach * This way is definitely faster, but subject to the GPU's limitations on precision */ - virtual void RenderUsingGPU(); + virtual void RenderUsingGPU(unsigned first_obj_id, unsigned last_obj_id); /** * Use the CPU to render the objects - "make a bitmap and convert it to a texture" approach @@ -50,7 +50,7 @@ namespace IPDF struct PixelBounds { int64_t x; int64_t y; int64_t w; int64_t h; - PixelBounds(const Rect & bounds) : x(bounds.x), y(bounds.y), w(bounds.w), h(bounds.h) {} + PixelBounds(const Rect & bounds) : x(Double(bounds.x)), y(Double(bounds.y)), w(Double(bounds.w)), h(Double(bounds.h)) {} }; static Rect CPURenderBounds(const Rect & bounds, const View & view, const CPURenderTarget & target); @@ -110,7 +110,7 @@ namespace IPDF public: BezierRenderer() : ObjectRenderer(BEZIER, "shaders/rect_vert.glsl", "shaders/rect_frag.glsl", "shaders/bezier_texbuf_geom.glsl") {} virtual ~BezierRenderer() {} - virtual void RenderUsingGPU(); + virtual void RenderUsingGPU(unsigned first_obj_id, unsigned last_obj_id); virtual void RenderUsingCPU(const Objects & objects, const View & view, const CPURenderTarget & target); void PrepareBezierGPUBuffer(const Objects & objects); private: