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

LibGL+LibSoftGPU: Add multiple texture coordinates to vertex struct

We now have one set of texture coordinates per texture unit.
Texture coordinate generation and texture coordinate assignment is
currently only stubbed. This will be rectified in another commit.
This commit is contained in:
Stephan Unverwerth 2022-01-15 18:33:55 +01:00 committed by Andreas Kling
parent 044582b0ce
commit 7571ef0343
5 changed files with 22 additions and 15 deletions

View file

@ -615,7 +615,8 @@ void SoftwareGLContext::gl_vertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w
vertex.position = { static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(w) };
vertex.color = m_current_vertex_color;
vertex.tex_coord = m_current_vertex_tex_coord;
for (size_t i = 0; i < m_device_info.num_texture_units; ++i)
vertex.tex_coords[i] = m_current_vertex_tex_coord;
vertex.normal = m_current_vertex_normal;
m_vertex_list.append(vertex);