mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibGL: Only normalize in glRotate*
if possible
Vectors of length 0 cannot be normalized, so prevent dividing by zero in the `glRotate*` API. This fixes the skybox rendering of Quake2.
This commit is contained in:
parent
2362cc2943
commit
5d0a64bfde
Notes:
sideshowbarker
2024-07-17 17:36:52 +09:00
Author: https://github.com/gmta
Commit: 5d0a64bfde
Pull-request: https://github.com/SerenityOS/serenity/pull/12980
Reviewed-by: https://github.com/sunverwerth ✅
2 changed files with 6 additions and 5 deletions
|
@ -70,7 +70,7 @@ public:
|
|||
void gl_push_matrix();
|
||||
void gl_pop_matrix();
|
||||
void gl_mult_matrix(FloatMatrix4x4 const& matrix);
|
||||
void gl_rotate(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
|
||||
void gl_rotate(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
void gl_scale(GLdouble x, GLdouble y, GLdouble z);
|
||||
void gl_translate(GLdouble x, GLdouble y, GLdouble z);
|
||||
void gl_vertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue