m_shader_program.Use();
m_ibo.Bind();
- glDrawElements(GL_LINES, (last_index-first_index)*2, GL_UNSIGNED_INT, (GLvoid*)(first_index*sizeof(uint32_t)));
+ glDrawElements(GL_LINES, (last_index-first_index)*2, GL_UNSIGNED_INT, (GLvoid*)(2*first_index*sizeof(uint32_t)));
}
BufferBuilder<GPUBezierCoeffs> builder(m_bezier_coeffs.Map(false, true, true), m_bezier_coeffs.GetSize());
- for (unsigned i = 0; i < objects.types.size(); ++i)
+ for (unsigned i = 0; i < objects.beziers.size(); ++i)
{
- if (objects.types[i] != BEZIER) continue;
- const Bezier & bez = objects.beziers[objects.data_indices[i]];//objects.beziers[objects.data_indices[i]].CopyInverse(objects.bounds[i]);
+ const Bezier & bez = objects.beziers[i];
GPUBezierCoeffs coeffs = {
Float(bez.x0), Float(bez.y0),
glUniform1i(m_shader_program.GetUniformLocation("bezier_buffer_texture"), 0);
glUniform1i(m_shader_program.GetUniformLocation("bezier_id_buffer_texture"), 1);
m_ibo.Bind();
- glDrawElements(GL_LINES, (last_index-first_index)*2, GL_UNSIGNED_INT, (GLvoid*)(first_index*sizeof(uint32_t)));
+ glDrawElements(GL_LINES, (last_index-first_index)*2, GL_UNSIGNED_INT, (GLvoid*)(2*first_index*sizeof(uint32_t)));
}
/**