Quellcode durchsuchen

Fixed invalid Y offset when rendering fonts

Marko Pintera vor 12 Jahren
Ursprung
Commit
a9571eaa33
2 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  1. 2 2
      CamelotCore/Source/CmTextSprite.cpp
  2. 1 3
      TODO.txt

+ 2 - 2
CamelotCore/Source/CmTextSprite.cpp

@@ -179,8 +179,8 @@ namespace CamelotEngine
 						assert(curVert < maxVertIdx);
 						assert(curIndex < maxIndexIdx);
 
-						UINT32 curX = penX + charIter->xOffset;
-						UINT32 curY = baselineY - charIter->yOffset;
+						INT32 curX = penX + charIter->xOffset;
+						INT32 curY = -(baselineY - charIter->yOffset);
 
 						vertices[curVert + 0] = Vector2((float)curX, (float)curY);
 						vertices[curVert + 1] = Vector2((float)(curX + charIter->width), (float)curY);

+ 1 - 3
TODO.txt

@@ -22,13 +22,11 @@ Figure out how to store texture references in a font?
 Move Debug to CamelotCore and add SetFillMode
 
 Test:
+Need sorted rendering as fonts render before scene and blending doesn't work as it should
 Better font (Terminal?)
-Shader with scene blending
 Test word wrap, implement clipping
 Add HLSL9 and GLSL text materials & shaders
 Add resolution to GUI shader
-Add 0.5 offset to GUI shader (depending on render system)
-Add transparency to GUI shader
 TextSprite needs to return multiple buffers in case characters are from different pages
 
 Mesh usability overhaul: