Béziers on the GPU.
So this was a terrible thing in many ways.
What we're doing:
- Converting all of the coefficients to floats (+ doing a bit of
preprocessing) and uploading the the GPU.
- Uploading the data_indices array from the document to the GPU.
- Using the vertex ids in the IBO when rendering béziers to get
the object id, then looking up the data_indices array (as a texture)
to find which bézier coefficients to use, then reading the bézier
coefficients from another buffer texture and finally having the
geometry shader generate 100 lines much as the CPU one does.
We're using buffer textures to access these things because they don't
have fixed sizes (and can get big), so we can't use uniform buffers and
because shader storage buffer objects need OpenGL 4.3, which only graphics
cards manufactured in the last 45 seconds actually support.
UCC git Repository :: git.ucc.asn.au