+
+}
+
+void View::ReRender()
+{
+ static bool debug_output_done = false;
+ if (!debug_output_done)
+ {
+ //m_document.DebugDumpObjects();
+ debug_output_done = true;
+
+ m_vertex_buffer.SetType(GraphicsBuffer::BufferTypeVertex);
+ m_index_buffer.SetUsage(GraphicsBuffer::BufferUsageStaticDraw);
+ m_index_buffer.SetType(GraphicsBuffer::BufferTypeIndex);
+
+ m_vertex_buffer.Upload(m_document.ObjectCount() * 8 * sizeof(float), NULL);
+ m_index_buffer.Upload(m_document.ObjectCount() * 5 * sizeof(uint32_t), NULL);
+ }
+ m_rendered_filled = m_rendered_outline = 0;
+
+ if (m_use_gpu_transform)
+ {
+ m_vertex_buffer.SetUsage(GraphicsBuffer::BufferUsageStaticDraw);
+ }
+ else
+ {
+ m_vertex_buffer.SetUsage(GraphicsBuffer::BufferUsageDynamicDraw);
+ }
+
+
+ //DrawGrid(); // Draw the gridlines
+
+
+
+ float *vertexData = (float*)m_vertex_buffer.Map(false, true, true);
+ uint32_t *indexData = (uint32_t*)m_index_buffer.Map(false, true, true);
+
+ uint32_t currentIndex = 0;