LibGL: Make texture coordinates a FloatVector4

In OpenGL, texture coordinates can have up to 4 values. This change
will help with easy application of texture coordinate matrix
transformations in the future.

Additionally, correct the initial value for texture coordinates to
`{ 0.f, 0.f, 0.f, 1.f}`.
This commit is contained in:
Jelle Raaijmakers 2021-12-21 00:46:21 +01:00 committed by Brian Gianforcaro
commit 4703e8cbcf
Notes: sideshowbarker 2024-07-17 22:28:34 +09:00
6 changed files with 6 additions and 6 deletions

View file

@ -496,7 +496,7 @@ SoftwareRasterizer::SoftwareRasterizer(const Gfx::IntSize& min_size)
void SoftwareRasterizer::submit_triangle(GLTriangle const& triangle, TextureUnit::BoundList const& bound_texture_units)
{
rasterize_triangle(m_options, *m_render_target, *m_depth_buffer, triangle, [this, &bound_texture_units](const FloatVector2& uv, const FloatVector4& color, float z) -> FloatVector4 {
rasterize_triangle(m_options, *m_render_target, *m_depth_buffer, triangle, [this, &bound_texture_units](FloatVector4 const& uv, FloatVector4 const& color, float z) -> FloatVector4 {
FloatVector4 fragment = color;
for (auto const& texture_unit : bound_texture_units) {