+ glDrawElements(GL_LINES, (last_index-first_index)*2, GL_UNSIGNED_INT, (GLvoid*)(2*first_index*sizeof(uint32_t)));
+}
+
+
+
+/**
+ * Render Path (shading)
+ */
+void PathRenderer::RenderUsingCPU(const Objects & objects, const View & view, const CPURenderTarget & target, unsigned first_obj_id, unsigned last_obj_id)
+{
+ if (!view.ShowingObjectBounds() && !view.PerformingShading())
+ return;
+
+ for (unsigned i = 0; i < m_indexes.size(); ++i)
+ {
+ if (m_indexes[i] < first_obj_id) continue;
+ if (m_indexes[i] >= last_obj_id) continue;
+
+
+ Rect bounds(CPURenderBounds(objects.bounds[m_indexes[i]], view, target));
+ PixelBounds pix_bounds(bounds);
+ const Path & path = objects.paths[objects.data_indices[m_indexes[i]]];
+ if (path.m_fill.a == 0 || !view.PerformingShading())
+ continue;
+
+ for (unsigned f = 0; f < path.m_fill_points.size(); ++f)
+ {
+ PixelPoint fill_point(CPUPointLocation(path.m_fill_points[f], view, target));
+ FloodFillOnCPU(fill_point.first, fill_point.second, pix_bounds, target, path.m_fill);
+ }
+
+ /*if (true)//(view.ShowingObjectBounds())
+ {
+
+ PixelPoint start(CPUPointLocation((path.m_top+path.m_left+path.m_right+path.m_bottom)/4, view, target));
+ for (unsigned f = 0; f < path.m_fill_points.size(); ++f)
+ {
+ PixelPoint end(CPUPointLocation(path.m_fill_points[f], view, target));
+ RenderLineOnCPU(start.first, start.second, end.first, end.second, target, Colour(0,0,1,1));
+ }
+ }
+ */
+
+ }