- virtual void RenderUsingCPU(const Objects & objects, const View & view, const CPURenderTarget & target);
+ virtual void RenderUsingCPU(const Objects & objects, const View & view, const CPURenderTarget & target, unsigned first_obj_id, unsigned last_obj_id);
+ };
+
+ /** Renderer for bezier curves **/
+ class BezierRenderer : public ObjectRenderer
+ {
+ public:
+ BezierRenderer() : ObjectRenderer(BEZIER, "shaders/rect_vert.glsl", "shaders/rect_frag.glsl", "shaders/bezier_texbuf_geom.glsl") {}
+ virtual ~BezierRenderer() {}
+ virtual void RenderUsingGPU(unsigned first_obj_id, unsigned last_obj_id);
+ virtual void RenderUsingCPU(const Objects & objects, const View & view, const CPURenderTarget & target, unsigned first_obj_id, unsigned last_obj_id);
+ void PrepareBezierGPUBuffer(const Objects & objects);
+ private:
+ GraphicsBuffer m_bezier_coeffs;
+ GraphicsBuffer m_bezier_ids;
+ struct GPUBezierCoeffs
+ {
+ float x0, y0;
+ float x1, y1;
+ float x2, y2;
+ };
+
+ GLuint m_bezier_buffer_texture;
+ GLuint m_bezier_id_buffer_texture;
+