cog
cog copied to clipboard
gl: Simplify GL renderer painting
We do not need to call glVertexAttribPointer() for each frame inside cog_gl_renderer_pain(). I think we still need the calls to gl{Enable,Disable}VertexAttribArray() before and after glDrawArrays().
The rotation may change at any time during execution, so at least the second call to set the texture UV-mapping would need to be re-applied when it changes. I think we could add a helper cog_gl_renderer_set_rotation() function that takes care of it 🤔
Originally posted by @aperezdc in https://github.com/Igalia/cog/pull/392#discussion_r785025277