mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibGL: Fix triangle winding calculation
Since we operate in screen space where y points down we need to reverse what is considered clock wise and what is considered counter clockwise. The rasterizer always expects triangles with a consistent winding order thus swap 2 vertices if necessary to reverse the winding before passing the triangle on to the rasterization stage.
This commit is contained in:
parent
220ac5eb02
commit
addbcd42d7
Notes:
sideshowbarker
2024-07-18 05:30:14 +09:00
Author: https://github.com/sunverwerth
Commit: addbcd42d7
Pull-request: https://github.com/SerenityOS/serenity/pull/9451
Reviewed-by: https://github.com/Quaker762 ✅
Reviewed-by: https://github.com/alimpfard
2 changed files with 6 additions and 2 deletions
|
@ -60,7 +60,7 @@ private:
|
|||
start_timer(20);
|
||||
|
||||
GL::make_context_current(m_context);
|
||||
glFrontFace(GL_CW);
|
||||
glFrontFace(GL_CCW);
|
||||
glEnable(GL_CULL_FACE);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue