Refactored FontRenderer, fixed Sandbox2D

This commit is contained in:
Simon Lübeß
2021-08-15 13:20:38 +02:00
parent f5f3bad8db
commit d200c2c849
4 changed files with 6 additions and 4 deletions
@@ -61,8 +61,8 @@ namespace GlitchyEngine.Renderer.Text
List<Texture2D> atlasses = scope .();
// freetype identifies glyphs using utf32 (which makes sense), so we enumerate the text as char32
for(char32 char in String.UTF8Enumerator(text, 0, text.Length))
// enumerate through the unicode codepoints
for(char32 char in text.DecodedChars)
{
if(char == '\n')
{
+1 -1
View File
@@ -5,7 +5,7 @@ Dependencies = {GlitchyEngine = "*", corlib = "*", LodePng = "*"}
Name = "Sandbox"
TargetType = "BeefGUIApplication"
StartupObject = "GlitchyEngine.Program"
ProcessorMacros = ["!SANDBOX_2D"]
ProcessorMacros = ["SANDBOX_2D"]
[Configs.Debug.Win64]
CLibType = "DynamicDebug"
+2 -1
View File
@@ -136,7 +136,7 @@ namespace Sandbox
Font fonty ~ _.ReleaseRef();
VertexLayout layout ~ delete _;
VertexLayout layout ~ _?.ReleaseRef();
GeometryBinding quadBinding ~ _?.ReleaseRef();
@@ -308,6 +308,7 @@ namespace Sandbox
Renderer2D.End();
*/
_alphaBlendState.Bind();
Renderer2D.Begin(.FrontToBack, .(_context.SwapChain.Width, _context.SwapChain.Height));
+1
View File
@@ -3,3 +3,4 @@ Mir geht es gut, danke der Nachfrage. Wie geht es dir?
順調に進んでいますし、何よりもエンジンがやっと文字を表示できるようになりました。
ÄÖÜüöäßÉéáÁèÈÀàâÊ💕❤
λ≙Ω⨁μ×∞
🤦🏿‍♀️