Skip to content

Bugfix: Colored edge rendering in core profile

Martin Heistermann requested to merge bugfix/core-render-colored-edges into master
This is a minimally invasive change, leaving the old code intact, as it
is shared with the other renderers.

Instead of creating render objects as it should, the previous
implementation called glDraw itself and used host-memory ("sysmem")
buffers for it, which are not supported in core OpenGL.

In the new implementation, edge coordinates and colors are uploaded to
a common VBO and rendered using proper render objects.

Having two VBOs for coordinates and colors respectively is advantageous
for better performance when rendering non-colored edges and could be
achieved by packing both in a VAO, which this implementation does not
yet do. However it's better to have something working than to have something
more efficient but broken.

NB Colored edge rendering in classic renderer was also(!) broken before and
is not fixed by this commit, crashes can be provoked by setting edge
colors, switching the drawmode to colored edges and emitting an
updatedObject with the UPDATE_COLORS flag.

I have not run any tests, but I suspect the colored halfedge drawmode to
be similarly broken. A big refactoring / rewrite might be a good idea.

This MR is on top of !187 (merged) and includes its commit.

CI at https://www.graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free/-/pipelines/14688 or (already finished, just a different commit message): https://www.graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free/-/pipelines/14687

Merge request reports