diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2021-12-26 15:30:20 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-27 11:58:43 +0100 |
commit | 7833f25f8f56ebcc41abc1d7fb62ed1bbfd98063 (patch) | |
tree | b5771f5c91e1d980edbf3f290f16cfe5997fc3be | |
parent | b2e75929f459dd6a29e1766cb86df97f5a65c745 (diff) | |
download | serenity-7833f25f8f56ebcc41abc1d7fb62ed1bbfd98063.zip |
LibGL: Remove stubbed border from `glTexImage2D`
Providing anything else than `border == 0` is deprecated and should
result in an invalid value error.
-rw-r--r-- | Userland/Libraries/LibGL/SoftwareGLContext.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibGL/Tex/Texture2D.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGL/Tex/Texture2D.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 64d89b456b..622474bbd0 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -818,7 +818,7 @@ void SoftwareGLContext::gl_tex_image_2d(GLenum target, GLint level, GLint intern // Check if width and height are a power of 2 RETURN_WITH_ERROR_IF((width & (width - 1)) != 0, GL_INVALID_VALUE); RETURN_WITH_ERROR_IF((height & (height - 1)) != 0, GL_INVALID_VALUE); - RETURN_WITH_ERROR_IF(border < 0 || border > 1, GL_INVALID_VALUE); + RETURN_WITH_ERROR_IF(border != 0, GL_INVALID_VALUE); if (level == 0) { // FIXME: OpenGL has the concept of texture and mipmap completeness. A texture has to fulfill certain criteria to be considered complete. @@ -844,7 +844,7 @@ void SoftwareGLContext::gl_tex_image_2d(GLenum target, GLint level, GLint intern m_sampler_config_is_dirty = true; } - m_active_texture_unit->bound_texture_2d()->upload_texture_data(level, internal_format, width, height, border, format, type, data, m_unpack_row_length, m_unpack_alignment); + m_active_texture_unit->bound_texture_2d()->upload_texture_data(level, internal_format, width, height, format, type, data, m_unpack_row_length, m_unpack_alignment); } void SoftwareGLContext::gl_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* data) diff --git a/Userland/Libraries/LibGL/Tex/Texture2D.cpp b/Userland/Libraries/LibGL/Tex/Texture2D.cpp index 19162eb2b9..762fd9d5fc 100644 --- a/Userland/Libraries/LibGL/Tex/Texture2D.cpp +++ b/Userland/Libraries/LibGL/Tex/Texture2D.cpp @@ -10,7 +10,7 @@ namespace GL { -void Texture2D::upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLint, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment) +void Texture2D::upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment) { // NOTE: Some target, format, and internal formats are currently unsupported. // Considering we control this library, and `gl.h` itself, we don't need to add any diff --git a/Userland/Libraries/LibGL/Tex/Texture2D.h b/Userland/Libraries/LibGL/Tex/Texture2D.h index 626c8d124f..91ac1e0dcf 100644 --- a/Userland/Libraries/LibGL/Tex/Texture2D.h +++ b/Userland/Libraries/LibGL/Tex/Texture2D.h @@ -29,7 +29,7 @@ public: public: virtual bool is_texture_2d() const override { return true; } - void upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment); + void upload_texture_data(GLuint lod, GLint internal_format, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment); void replace_sub_texture_data(GLuint lod, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels, GLsizei pixels_per_row, u8 byte_alignment); MipMap const& mipmap(unsigned lod) const |