1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:47:35 +00:00

LibGL: Handle multiple texture coordinates in client state

This now tracks one vertex attribute pointer per texture unit and calls
glMultiTexCoord() to set the texture coordinates for the correct texture
unit.
This commit is contained in:
Stephan Unverwerth 2022-01-15 20:08:22 +01:00 committed by Andreas Kling
parent 7571ef0343
commit a2c771a913
2 changed files with 33 additions and 21 deletions

View file

@ -254,7 +254,8 @@ private:
// Client side arrays
bool m_client_side_vertex_array_enabled = false;
bool m_client_side_color_array_enabled = false;
bool m_client_side_texture_coord_array_enabled = false;
Vector<bool> m_client_side_texture_coord_array_enabled;
size_t m_client_active_texture = 0;
NonnullRefPtr<Gfx::Bitmap> m_frontbuffer;
@ -419,7 +420,7 @@ private:
VertexAttribPointer m_client_vertex_pointer;
VertexAttribPointer m_client_color_pointer;
VertexAttribPointer m_client_tex_coord_pointer;
Vector<VertexAttribPointer> m_client_tex_coord_pointer;
u8 m_pack_alignment { 4 };
GLsizei m_unpack_row_length { 0 };