1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

LibGL+LibGPU+LibSoftGPU: Implement matrix stack per texture unit

Each texture unit now has its own texture transformation matrix stack.
Introduce a new texture unit configuration that is synced when changed.
Because we're no longer passing a silly `Vector` when drawing each
primitive, this results in a slightly improved frames per second :^)
This commit is contained in:
Jelle Raaijmakers 2022-09-05 00:40:27 +02:00 committed by Linus Groh
parent 1540c56e6c
commit 00d46e5d77
22 changed files with 208 additions and 152 deletions

View file

@ -22,7 +22,7 @@ void GLContext::gl_clip_plane(GLenum plane, GLdouble const* equation)
auto plane_idx = static_cast<size_t>(plane) - GL_CLIP_PLANE0;
auto eqn = FloatVector4(equation[0], equation[1], equation[2], equation[3]);
m_clip_plane_attributes.eye_clip_plane[plane_idx] = m_model_view_matrix * eqn;
m_clip_plane_attributes.eye_clip_plane[plane_idx] = model_view_matrix() * eqn;
m_clip_planes_dirty = true;
}