HW shaders: Avoid redundant glVertexAttrib4f calls

This commit is contained in:
wheremyfoodat 2024-10-05 21:14:40 +03:00
parent 0a2bc7c909
commit e3252ec4ef
2 changed files with 19 additions and 6 deletions

View file

@ -99,6 +99,9 @@ class RendererGL final : public Renderer {
std::unique_ptr<StreamBuffer> hwVertexBuffer;
std::unique_ptr<StreamBuffer> hwIndexBuffer;
// Cache of fixed attribute values so that we don't do any duplicate updates
std::array<std::array<float, 4>, 16> fixedAttrValues;
// Cached recompiled fragment shader
struct CachedProgram {
OpenGL::Program program;