From 9a8aae4d5e26660ee22a982c32bc915c89357b21 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Mon, 20 Mar 2023 21:12:03 -0700 Subject: [PATCH] Testing UI without assets. --- assets/bmfont.png | Bin 2747 -> 0 bytes src/dawn/display/font/CMakeLists.txt | 1 + src/dawn/display/font/ExampleFont.cpp | 104 ++++++++++++++++++ src/dawn/display/font/ExampleFont.hpp | 22 ++++ src/dawn/scene/components/ui/UILabel.cpp | 2 +- src/dawnhelloworld/scenes/HelloWorldScene.hpp | 22 ++++ src/dawnopengl/display/RenderManager.cpp | 4 +- src/dawnopengl/display/RenderManager.hpp | 2 + 8 files changed, 154 insertions(+), 3 deletions(-) delete mode 100644 assets/bmfont.png create mode 100644 src/dawn/display/font/ExampleFont.cpp create mode 100644 src/dawn/display/font/ExampleFont.hpp diff --git a/assets/bmfont.png b/assets/bmfont.png deleted file mode 100644 index 43b9f57c4d91699b7d98f8e9652c06a2a089af23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2747 zcmV;s3PkmZP)J|9?66Wv7==kOcN5X^UPG4@O`cW1M8W$4$Wf ze!oZ0kK;Hh^5ZxT`#!Q0J@+ihoL95OxIPxZmi{r!Hwep^ z+_pXMDU0kyJk^C>1zVt%1&bCY8zb6u(R`lvBL9x#I6fjLBlyKb##eV?b+WAv3d(b0 zGx_lk8Ml>38Oic@Hw^_d#a^f@T0q61}&i(R&6om@K_TJ0{Xa{-L0X>@vBM z-8^3>7|`a*GOCx`Adv&0n*y_ep8c7;>X&`~>|-MH<93UK)z3jByBhKlu#y2-u&~{T z{9*DP{wwm8BarD=GldVN?1(DW0G=!}oH?s5SR`KwpdJ2a6KM53fAtvj0T!k3OgEER zU$P@?Db2FM?n+~9$6axRs62{3%ZQ#U8ym`8h|{mrL%UOmpmR5SZX=qdSj2&{jN&)a zU6HSHzX~6>o9-N&0Q*`2)3uS?NwK~^3&748kY8+?{=N<3hWMA*-cFMDml_qInO@P8e|Ku z$Ul*Bl`t}pRmpz9Ojkj50;)lz=p)W^+-LSuYF?c0l|r z0HQwC-KgkyfELjEe=a1u0U-|mZ0kaGBHTK5yYcjicArNj74MM$MEr<>tn9wZ4jBMs z)vA4t`qSJbG zsix1#eb0pqzN{>YB%+b%il;{$`$C#y$T_m=dM;PmO8rN}JB zTds(oaVS2n^r;*ZT^~C7jJNcQppJt!z1!D_H`?Wuw2HEf;v)-AmYups(A9X?W9b1q zqQ9E~UX9h=KNt)KJ$yU+y4SEwpUI_&VN)@XGWBBN~w0y zGu0ne&ib#m?Q`TySAGxB;m`aJzg(!^#aDI+v%f3DtoUEC(Ls0Tt2}Ugl^w@+Z^cR5 zRw7*W7wwP^Uxnuhp{OjqP-V$sA^q`!N(H_8IY1a;?IL9iE3(xc zUg4>N{+&Q|2ity?Gq7qO^+CR6T&p`M3LaDkvHA1%R~J3fZ)f4FqHr)63hijlRd6|Q@@9rRAe2P7rf{}hT7}W8u zERy#T@mG1J|1W?|5ZYalW7RW?=`-I~ceqW#Y<$Q!6a+i6Xg1eZXXwFTFc|zu%+L9lGKh3!bx2huhk)d>!4$hxt8#(NlK1 zM>M(UoL|kbtGZnuzLalo%j%plLj{Ni-US>H~{O`1-Zv#<;De_eyes&FH zyT{A2g+y|N7md$nn1}=Eui)DUL79WrneHTaf%xpiu@sGt2*n2SZ*|;^-}=(E5#iha z8^|JXcLs=3I6KEGHvF!Nbd?>d+PNYFDt2xAnf8~#&Zxm)Fc@5hy94XP^sCnp`%I~T zQF}!{^FfiLW2-YC5eJ%o#s$~7>L4ha+24iJ2D&9xKP9y7N|1SdBrpFSpfj0_-`>+Rn=1=h8DAGCf8?XGsWN>V zJZ%0Df7Wl??*TIS0d@540HRFbkAc z!C)|W3fL7VdX26zzMthoDSkyB`N2o5gYmE0-@)Ip`*jOA{=v7;_t~pAe9Cq$!0v@q z_;*&_NFQB0cknBCxCLZ^fL{Gzd?2hiXMH>US>>zpuU6H&Z%v55Ge0lS0Ic7YawSN; zynD^f^sDw+o9TNWUY-FeI}ph;TV9Ut%^iLQ)jy`cLmv6?VFlS_q1Q+!Gd6fXeElTs zc8eF01px}4R}5%S!(@Ozj&C)9ZQJ+g?DV_6yZcwNhRsMFo~TC1#@OL!`po{S{~4sO zgMS*bK<)6XWVC7#+|lpYx6glN0Ib#@NMGT;(*AD!FaSDt%Zf8QBb)KF9p>fUx844u zqx1@X2I)VHP@$eZT|2w^cb@AE=re{_@!xL$ZUKY8iwS@~jtPK2j&Gk6ckiJL3jdX# zBJQxiazFP_Ih3MQv6tDW*FZ*i0mOzU&q~n^`KPkEBcuaiX5Huo%x73(EKwlxW-inkrCy2 zb%IryBJbF*_!nU{0CxGGwdd~yZo+AU-H?!O)JM54s`DFR{!ZW~ocxiG%BITnZSb)9 zL;P94`8$C(oZc0=m7xs4bR&Ir{@L8T`nK_F@QmYRFc=J;gZ6oR70`M2Th22-k4l~N z7Gq~cka9kvepVLsV>UAR-5~1chE@Y;D>__G450 z@7lMvI&;JHqcv2=AblOI4B+gSO=5NNJBxrOughuC3E=E{*0J5?@Vd4wWq=BzAh>$x zXJd#mn7vn@AFf21Va1OuJF?BgcvpN(=cr1g8tP<#sE<$4j017{Ku|fZhF_ejZ!1Rt z{hYpHfGto*UI~C#)EGYtexture = &this->realTexture; + this->tileset = &this->realTilesetGrid; +} + +struct Color ExampleFont::getColor(uint8_t n) { + if(n == 0) return COLOR_TRANSPARENT; + return COLOR_WHITE; +} + +void ExampleFont::init() { + struct Color pixels[128*64]; + uint8_t data[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0xD8, 0x50, 0x78, 0xC8, 0x70, 0x30, 0x30, 0x60, 0x48, 0x20, 0x00, 0x00, 0x00, 0x18, + 0x00, 0x30, 0xD8, 0xF8, 0xA0, 0xD0, 0xC8, 0x30, 0x60, 0x30, 0x30, 0x20, 0x00, 0x00, 0x00, 0x30, + 0x00, 0x30, 0x90, 0x50, 0x70, 0x20, 0x60, 0x60, 0x60, 0x30, 0x78, 0xF8, 0x00, 0xF8, 0x00, 0x60, + 0x00, 0x00, 0x00, 0xF8, 0x28, 0x58, 0xD4, 0x00, 0x60, 0x30, 0x30, 0x20, 0x30, 0x00, 0x30, 0xC0, + 0x00, 0x30, 0x00, 0x50, 0xF0, 0x98, 0xC8, 0x00, 0x30, 0x60, 0x48, 0x20, 0x30, 0x00, 0x30, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x10, 0xF0, 0xF0, 0x38, 0xF8, 0x70, 0xF8, 0x70, 0x70, 0x30, 0x30, 0x18, 0x00, 0x60, 0xF0, + 0x88, 0x30, 0x08, 0x08, 0x48, 0x80, 0x80, 0x08, 0x88, 0x88, 0x30, 0x30, 0x30, 0xF8, 0x30, 0x08, + 0x88, 0x10, 0x70, 0x30, 0x88, 0xF0, 0xF0, 0x10, 0x70, 0x78, 0x00, 0x00, 0x60, 0x00, 0x18, 0x70, + 0x88, 0x10, 0x80, 0x08, 0xF8, 0x08, 0x88, 0x20, 0x88, 0x08, 0x30, 0x30, 0x30, 0xF8, 0x30, 0x00, + 0x70, 0x10, 0xF8, 0xF0, 0x08, 0xF0, 0x70, 0x20, 0x70, 0x70, 0x30, 0x10, 0x18, 0x00, 0x60, 0x60, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x70, 0xF0, 0x78, 0xF0, 0xF8, 0xF8, 0x78, 0x88, 0xF8, 0x08, 0x48, 0x80, 0x88, 0x88, 0x70, + 0x88, 0x88, 0x88, 0x80, 0x88, 0x80, 0x80, 0x80, 0x88, 0x20, 0x08, 0x50, 0x80, 0xD8, 0xC8, 0x88, + 0xB8, 0x88, 0xF0, 0x80, 0x88, 0xF0, 0xF0, 0xB8, 0xF8, 0x20, 0x08, 0x60, 0x80, 0xA8, 0xA8, 0x88, + 0x80, 0xF8, 0x88, 0x80, 0x88, 0x80, 0x80, 0x88, 0x88, 0x20, 0x88, 0x50, 0x80, 0x88, 0x98, 0x88, + 0x70, 0x88, 0xF0, 0x78, 0xF0, 0xF8, 0x80, 0x78, 0x88, 0xF8, 0x70, 0x48, 0xF8, 0x88, 0x88, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF0, 0x70, 0xF0, 0x78, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x88, 0xF8, 0xF0, 0x80, 0xF0, 0x20, 0x00, + 0x88, 0x88, 0x88, 0x80, 0x20, 0x88, 0x88, 0x88, 0x50, 0x50, 0x10, 0xC0, 0xC0, 0x30, 0x50, 0x00, + 0xF0, 0x88, 0xF0, 0x70, 0x20, 0x88, 0x88, 0xA8, 0x20, 0x20, 0x20, 0xC0, 0x60, 0x30, 0x88, 0x00, + 0x80, 0x88, 0xA0, 0x08, 0x20, 0x88, 0x50, 0xD8, 0x50, 0x20, 0x40, 0xC0, 0x30, 0x30, 0x00, 0x00, + 0x80, 0x70, 0x98, 0xF0, 0x20, 0x78, 0x20, 0x88, 0x88, 0x20, 0xF8, 0xF0, 0x18, 0xF0, 0x00, 0xF8, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x30, 0x70, 0xF0, 0x78, 0xF0, 0xF8, 0xF8, 0x78, 0x88, 0x70, 0x08, 0x48, 0x40, 0x88, 0x88, 0x70, + 0x30, 0x88, 0x88, 0x80, 0x88, 0x80, 0x80, 0x80, 0x88, 0x20, 0x08, 0x50, 0x40, 0xD8, 0xC8, 0x88, + 0x18, 0x88, 0xF0, 0x80, 0x88, 0xF0, 0xF0, 0xB8, 0xF8, 0x20, 0x08, 0x60, 0x40, 0xA8, 0xA8, 0x88, + 0x00, 0xF8, 0x88, 0x80, 0x88, 0x80, 0x80, 0x88, 0x88, 0x20, 0x88, 0x50, 0x40, 0x88, 0x98, 0x88, + 0x00, 0x88, 0xF0, 0x78, 0xF0, 0xF8, 0x80, 0x78, 0x88, 0x70, 0x70, 0x48, 0x78, 0x88, 0x88, 0x70, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF0, 0x70, 0xF0, 0x78, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x88, 0xF8, 0x70, 0x30, 0x70, 0x48, 0x00, + 0x88, 0x88, 0x88, 0x80, 0x20, 0x88, 0x88, 0x88, 0x50, 0x50, 0x10, 0x60, 0x30, 0x30, 0xB0, 0x00, + 0xF0, 0x88, 0xF0, 0x70, 0x20, 0x88, 0x88, 0xA8, 0x20, 0x20, 0x20, 0xC0, 0x30, 0x18, 0x00, 0x00, + 0x80, 0x88, 0xA0, 0x08, 0x20, 0x88, 0x50, 0xD8, 0x50, 0x20, 0x40, 0x60, 0x30, 0x30, 0x00, 0x00, + 0x80, 0x70, 0x98, 0xF0, 0x20, 0x78, 0x20, 0x88, 0x88, 0x20, 0xF8, 0x70, 0x30, 0x70, 0x00, 0x00, + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + int32_t j = 0; + for(int32_t i = 0; i < ((128/8) * 64); i++) { + uint8_t n = data[i]; + pixels[j++] = this->getColor(n & 0x80); + pixels[j++] = this->getColor(n & 0x40); + pixels[j++] = this->getColor(n & 0x20); + pixels[j++] = this->getColor(n & 0x10); + pixels[j++] = this->getColor(n & 0x08); + pixels[j++] = this->getColor(n & 0x04); + pixels[j++] = this->getColor(n & 0x02); + pixels[j++] = this->getColor(n & 0x01); + } + + this->realTexture.setSize(128, 64); + this->realTexture.buffer(pixels); +} diff --git a/src/dawn/display/font/ExampleFont.hpp b/src/dawn/display/font/ExampleFont.hpp new file mode 100644 index 00000000..dc0b68e9 --- /dev/null +++ b/src/dawn/display/font/ExampleFont.hpp @@ -0,0 +1,22 @@ +// Copyright (c) 2023 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "BitmapFont.hpp" + +namespace Dawn { + class ExampleFont : public BitmapFont { + protected: + Texture realTexture; + TilesetGrid realTilesetGrid; + + struct Color getColor(uint8_t n); + + public: + ExampleFont(); + + void init(); + }; +} \ No newline at end of file diff --git a/src/dawn/scene/components/ui/UILabel.cpp b/src/dawn/scene/components/ui/UILabel.cpp index 2b1d46b2..68580e10 100644 --- a/src/dawn/scene/components/ui/UILabel.cpp +++ b/src/dawn/scene/components/ui/UILabel.cpp @@ -12,7 +12,7 @@ UILabel::UILabel(SceneItem *item) : UIComponent(item), text(""), fontSize(10.0f), - font(nullptr), + font(&item->scene->game->renderManager.defaultFont), maxWidth(UI_LABEL_MAX_WIDTH_NONE) { } diff --git a/src/dawnhelloworld/scenes/HelloWorldScene.hpp b/src/dawnhelloworld/scenes/HelloWorldScene.hpp index 4c6a9e90..279a7a5d 100644 --- a/src/dawnhelloworld/scenes/HelloWorldScene.hpp +++ b/src/dawnhelloworld/scenes/HelloWorldScene.hpp @@ -6,17 +6,39 @@ #pragma once #include "scene/Scene.hpp" #include "prefabs/SimpleSpinningCubePrefab.hpp" +#include "scene/components/ui/UILabel.hpp" +#include "scene/components/ui/UIImage.hpp" +#include "display/font/BitmapFont.hpp" namespace Dawn { class HelloWorldScene : public Scene { protected: Camera *camera; SimpleSpinningCubePrefab *cube; + UICanvas *canvas; + UILabel *label; + UIImage *image; + BitmapFont font; void stage() override { camera = Camera::create(this); camera->transform->lookAt(glm::vec3(3, 3, 3), glm::vec3(0, 0, 0)); + cube = SimpleSpinningCubePrefab::create(this); + + canvas = UICanvas::create(this); + + auto imageItem = this->createSceneItem(); + image = imageItem->addComponent(); + image->color = COLOR_BLACK; + imageItem->transform.setParent(canvas->transform); + + auto labelItem = this->createSceneItem(); + label = labelItem->addComponent(); + labelItem->transform.setParent(canvas->transform); + label->text = "Hello World, how are you today? I hope you are doing well. I really like the fact I can ramble in my text for once."; + label->maxWidth = 220; + image->alignment = glm::vec4(0, 0, label->getContentWidth(), label->getContentHeight()); } std::vector getRequiredAssets() override { diff --git a/src/dawnopengl/display/RenderManager.cpp b/src/dawnopengl/display/RenderManager.cpp index e123b5e7..d38fc59a 100644 --- a/src/dawnopengl/display/RenderManager.cpp +++ b/src/dawnopengl/display/RenderManager.cpp @@ -18,15 +18,15 @@ RenderManager::RenderManager(DawnGame *game) : void RenderManager::init() { this->renderPipeline.init(); - this->simpleShader.compile(); this->uiShaderProgram.compile(); - // Prepare the initial values glEnable(GL_TEXTURE_2D); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDepthMask(GL_TRUE); glDepthFunc(GL_LESS); + + this->defaultFont.init(); } RenderTarget * RenderManager::getBackBuffer() { diff --git a/src/dawnopengl/display/RenderManager.hpp b/src/dawnopengl/display/RenderManager.hpp index 48ba524a..a312a047 100644 --- a/src/dawnopengl/display/RenderManager.hpp +++ b/src/dawnopengl/display/RenderManager.hpp @@ -9,6 +9,7 @@ #include "display/shader/SimpleTexturedShader.hpp" #include "display/shader/UIShaderProgram.hpp" #include "display/RenderPipeline.hpp" +#include "display/font/ExampleFont.hpp" namespace Dawn { class RenderManager : public IRenderManager { @@ -19,6 +20,7 @@ namespace Dawn { BackBufferRenderTarget backBuffer; SimpleTexturedShader simpleShader; UIShaderProgram uiShaderProgram; + ExampleFont defaultFont; /** * Construct a new RenderManager for a game instance.