mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
LibGL: Remove stubbed border from glTexImage2D
Providing anything else than `border == 0` is deprecated and should result in an invalid value error.
This commit is contained in:
parent
b2e75929f4
commit
7833f25f8f
3 changed files with 4 additions and 4 deletions
|
@ -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
|
// 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((width & (width - 1)) != 0, GL_INVALID_VALUE);
|
||||||
RETURN_WITH_ERROR_IF((height & (height - 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) {
|
if (level == 0) {
|
||||||
// FIXME: OpenGL has the concept of texture and mipmap completeness. A texture has to fulfill certain criteria to be considered complete.
|
// 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_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)
|
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)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace GL {
|
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.
|
// 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
|
// Considering we control this library, and `gl.h` itself, we don't need to add any
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
public:
|
public:
|
||||||
virtual bool is_texture_2d() const override { return true; }
|
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);
|
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
|
MipMap const& mipmap(unsigned lod) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue