1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

LibGL: Set W-coordinate to 1 in glRect*

According to the spec, these calls should be identical to an invocation
of `glVertex2*`, which sets the W-coordinate to 1 by default.

This fixes the credits sequence rendering of Tux Racer.
This commit is contained in:
Jelle Raaijmakers 2022-04-18 10:57:45 +02:00 committed by Andreas Kling
parent e1a6966863
commit 65d4fb7649
3 changed files with 36 additions and 18 deletions

View file

@ -2878,10 +2878,10 @@ void GLContext::gl_rect(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
gl_begin(GL_POLYGON);
gl_vertex(x1, y1, 0.0, 0.0);
gl_vertex(x2, y1, 0.0, 0.0);
gl_vertex(x2, y2, 0.0, 0.0);
gl_vertex(x1, y2, 0.0, 0.0);
gl_vertex(x1, y1, 0.0, 1.0);
gl_vertex(x2, y1, 0.0, 1.0);
gl_vertex(x2, y2, 0.0, 1.0);
gl_vertex(x1, y2, 0.0, 1.0);
gl_end();
}