瀏覽代碼

Fixed invalid Y offset when rendering fonts

Marko Pintera 12 年之前
父節點
當前提交
a9571eaa33
共有 2 個文件被更改,包括 3 次插入5 次删除
  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(curVert < maxVertIdx);
 						assert(curIndex < maxIndexIdx);
 						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 + 0] = Vector2((float)curX, (float)curY);
 						vertices[curVert + 1] = Vector2((float)(curX + charIter->width), (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
 Move Debug to CamelotCore and add SetFillMode
 
 
 Test:
 Test:
+Need sorted rendering as fonts render before scene and blending doesn't work as it should
 Better font (Terminal?)
 Better font (Terminal?)
-Shader with scene blending
 Test word wrap, implement clipping
 Test word wrap, implement clipping
 Add HLSL9 and GLSL text materials & shaders
 Add HLSL9 and GLSL text materials & shaders
 Add resolution to GUI shader
 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
 TextSprite needs to return multiple buffers in case characters are from different pages
 
 
 Mesh usability overhaul:
 Mesh usability overhaul: