diff options
author | Stephan Unverwerth <s.unverwerth@serenityos.org> | 2021-08-16 19:25:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-18 20:30:58 +0200 |
commit | addbcd42d7e5bb34d48bcbe9ee0830bb1fd76442 (patch) | |
tree | 6eac3b8ab74f11a254502e59e50a1f5a518469dd /Userland/Applications/3DFileViewer | |
parent | 220ac5eb026c8e1fd01af0544c0e367c886eab80 (diff) | |
download | serenity-addbcd42d7e5bb34d48bcbe9ee0830bb1fd76442.zip |
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.
Diffstat (limited to 'Userland/Applications/3DFileViewer')
-rw-r--r-- | Userland/Applications/3DFileViewer/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp index 85744461bc..870381c97d 100644 --- a/Userland/Applications/3DFileViewer/main.cpp +++ b/Userland/Applications/3DFileViewer/main.cpp @@ -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); |