mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:57:35 +00:00
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:
parent
86b249f02f
commit
4703e8cbcf
6 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue