From bb95e6862a35e85ca7514cf941854732f99dbc40 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 7 Dec 2014 02:59:56 +0100 Subject: [PATCH] Fixed sprites being rendered upside-down in 2D This is still waiting for a fix because it will be upside-down in 3D Former-commit-id: ca4bef616f3496db22349eb907ec32a0b6c3deb8 --- src/Nazara/Graphics/ForwardRenderTechnique.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Nazara/Graphics/ForwardRenderTechnique.cpp b/src/Nazara/Graphics/ForwardRenderTechnique.cpp index 68726c809..896e7c70a 100644 --- a/src/Nazara/Graphics/ForwardRenderTechnique.cpp +++ b/src/Nazara/Graphics/ForwardRenderTechnique.cpp @@ -421,19 +421,19 @@ void NzForwardRenderTechnique::DrawSprites(const NzScene* scene) const NzVector3f center = sprite->GetPosition(); NzQuaternionf rotation = sprite->GetRotation(); - vertices->position = center + rotation * NzVector3f(-halfSize.x, -halfSize.y, 0.f); + vertices->position = center + rotation * NzVector3f(-halfSize.x, halfSize.y, 0.f); vertices->uv.Set(textureCoords.x, textureCoords.y + textureCoords.height); vertices++; - vertices->position = center + rotation * NzVector3f(halfSize.x, -halfSize.y, 0.f); + vertices->position = center + rotation * NzVector3f(halfSize.x, halfSize.y, 0.f); vertices->uv.Set(textureCoords.width, textureCoords.y + textureCoords.height); vertices++; - vertices->position = center + rotation * NzVector3f(-halfSize.x, halfSize.y, 0.f); + vertices->position = center + rotation * NzVector3f(-halfSize.x, -halfSize.y, 0.f); vertices->uv.Set(textureCoords.x, textureCoords.y); vertices++; - vertices->position = center + rotation * NzVector3f(halfSize.x, halfSize.y, 0.f); + vertices->position = center + rotation * NzVector3f(halfSize.x, -halfSize.y, 0.f); vertices->uv.Set(textureCoords.width, textureCoords.y); vertices++; }