diff --git a/Userland/Libraries/LibGL/GLStruct.h b/Userland/Libraries/LibGL/GLStruct.h index 72bb8cc3c3..a7434fba1b 100644 --- a/Userland/Libraries/LibGL/GLStruct.h +++ b/Userland/Libraries/LibGL/GLStruct.h @@ -20,7 +20,7 @@ struct GLColor { struct GLVertex { FloatVector4 position; FloatVector4 color; - FloatVector2 tex_coord; + FloatVector4 tex_coord; FloatVector3 normal; }; diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 82d5259a7a..e382bff19d 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -608,7 +608,7 @@ void SoftwareGLContext::gl_vertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w vertex.position = { static_cast(x), static_cast(y), static_cast(z), static_cast(w) }; vertex.color = m_current_vertex_color; - vertex.tex_coord = { m_current_vertex_tex_coord.x(), m_current_vertex_tex_coord.y() }; + vertex.tex_coord = m_current_vertex_tex_coord; vertex.normal = m_current_vertex_normal; vertex_list.append(vertex); diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.h b/Userland/Libraries/LibGL/SoftwareGLContext.h index d6b744cefc..7a4d9806da 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.h +++ b/Userland/Libraries/LibGL/SoftwareGLContext.h @@ -171,7 +171,7 @@ private: GLint m_clear_stencil { 0 }; FloatVector4 m_current_vertex_color = { 1.0f, 1.0f, 1.0f, 1.0f }; - FloatVector4 m_current_vertex_tex_coord = { 0.0f, 0.0f, 0.0f, 0.0f }; + FloatVector4 m_current_vertex_tex_coord = { 0.0f, 0.0f, 0.0f, 1.0f }; FloatVector3 m_current_vertex_normal = { 0.0f, 0.0f, 1.0f }; Vector vertex_list; diff --git a/Userland/Libraries/LibGL/SoftwareRasterizer.cpp b/Userland/Libraries/LibGL/SoftwareRasterizer.cpp index 5e82478ad9..aa175786e9 100644 --- a/Userland/Libraries/LibGL/SoftwareRasterizer.cpp +++ b/Userland/Libraries/LibGL/SoftwareRasterizer.cpp @@ -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) { diff --git a/Userland/Libraries/LibGL/Tex/Sampler2D.cpp b/Userland/Libraries/LibGL/Tex/Sampler2D.cpp index 579285f29a..be9886bfe2 100644 --- a/Userland/Libraries/LibGL/Tex/Sampler2D.cpp +++ b/Userland/Libraries/LibGL/Tex/Sampler2D.cpp @@ -50,7 +50,7 @@ static constexpr float wrap(float value, GLint mode, int num_texels) } } -FloatVector4 Sampler2D::sample(FloatVector2 const& uv) const +FloatVector4 Sampler2D::sample(FloatVector4 const& uv) const { // FIXME: Calculate the correct mipmap level here, need to receive uv derivatives for that unsigned lod = 0; diff --git a/Userland/Libraries/LibGL/Tex/Sampler2D.h b/Userland/Libraries/LibGL/Tex/Sampler2D.h index 0de0dec1af..eea80abb1d 100644 --- a/Userland/Libraries/LibGL/Tex/Sampler2D.h +++ b/Userland/Libraries/LibGL/Tex/Sampler2D.h @@ -31,7 +31,7 @@ public: void set_wrap_s_mode(GLint value) { m_wrap_s_mode = value; } void set_wrap_t_mode(GLint value) { m_wrap_t_mode = value; } - FloatVector4 sample(FloatVector2 const& uv) const; + FloatVector4 sample(FloatVector4 const& uv) const; private: Texture2D const& m_texture;