mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 20:22:55 +00:00
LibGL: Implement glPixelStorei
This sets the length of a row for the image to be transferred. This value is measured in pixels. When a rectangle with a width less than this value is transferred the remaining pixels of this row are skipped.
This commit is contained in:
parent
eb368a5000
commit
19a08ff187
Notes:
sideshowbarker
2024-07-18 05:16:25 +09:00
Author: https://github.com/sunverwerth
Commit: 19a08ff187
Pull-request: https://github.com/SerenityOS/serenity/pull/9550
Reviewed-by: https://github.com/Quaker762 ✅
7 changed files with 79 additions and 31 deletions
|
@ -650,7 +650,7 @@ void SoftwareGLContext::gl_tex_image_2d(GLenum target, GLint level, GLint intern
|
|||
RETURN_WITH_ERROR_IF((width & 2) != 0 || (height & 2) != 0, GL_INVALID_VALUE);
|
||||
RETURN_WITH_ERROR_IF(border < 0 || border > 1, GL_INVALID_VALUE);
|
||||
|
||||
m_active_texture_unit->bound_texture_2d()->upload_texture_data(target, level, internal_format, width, height, border, format, type, data);
|
||||
m_active_texture_unit->bound_texture_2d()->upload_texture_data(target, level, internal_format, width, height, border, format, type, data, m_unpack_row_length);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_tex_parameter(GLenum target, GLenum pname, GLfloat param)
|
||||
|
@ -1805,6 +1805,20 @@ void SoftwareGLContext::gl_fogi(GLenum pname, GLint param)
|
|||
m_rasterizer.set_options(options);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_pixel_store(GLenum pname, GLfloat param)
|
||||
{
|
||||
// FIXME: Implement missing parameters
|
||||
switch (pname) {
|
||||
case GL_UNPACK_ROW_LENGTH:
|
||||
RETURN_WITH_ERROR_IF(param < 0, GL_INVALID_VALUE);
|
||||
m_unpack_row_length = static_cast<size_t>(param);
|
||||
break;
|
||||
default:
|
||||
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SoftwareGLContext::present()
|
||||
{
|
||||
m_rasterizer.blit_to(*m_frontbuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue