From: Angelos Gkountis Date: Wed, 13 Jun 2018 15:03:35 +0000 (+0100) Subject: Fixed perspective projection issues. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5452fcfb568907c18dd7405340e0902aefbb649;p=platform%2Fcore%2Fuifw%2Fdali-core.git Fixed perspective projection issues. > Changed the projection correction matrix to correctly negate the Z axis to match DALi's coordinate system. > Changed the front face winding order to match the Z axis inversion. Change-Id: I8dfe7efa35e96ea9465085429b6b40f34781c259 --- diff --git a/dali/internal/update/graphics/graphics-algorithms.cpp b/dali/internal/update/graphics/graphics-algorithms.cpp index d253c59..fc0903f 100644 --- a/dali/internal/update/graphics/graphics-algorithms.cpp +++ b/dali/internal/update/graphics/graphics-algorithms.cpp @@ -32,6 +32,7 @@ #include #include #include +#include "../../../graphics-api/graphics-api-types.h" namespace Dali { @@ -43,7 +44,10 @@ namespace { static constexpr float CLIP_MATRIX_DATA[] = { - 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f, 0.0f, 0.0f, 0.5f, 1.0f + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, -0.5f, 0.0f, + 0.0f, 0.0f, 0.5f, 1.0f }; static const Matrix CLIP_MATRIX(CLIP_MATRIX_DATA); @@ -371,9 +375,9 @@ bool PrepareGraphicsPipeline( Graphics::API::Controller& controller, // rasterization .SetRasterizationState(RasterizationState() - .SetCullMode(CullMode::NONE) + .SetCullMode(CullMode::BACK) .SetPolygonMode(PolygonMode::FILL) - .SetFrontFace(FrontFace::CLOCKWISE))); + .SetFrontFace(FrontFace::COUNTER_CLOCKWISE))); // bind pipeline to the renderer renderer->BindPipeline(std::move(pipeline));