| 161 | dmRenderDDF::GlyphBank* m_GlyphBank; |
| 162 | |
| 163 | void SetUp() override |
| 164 | { |
| 165 | dmGraphics::InstallAdapter(dmGraphics::ADAPTER_FAMILY_NONE); |
| 166 | |
| 167 | WindowCreateParams win_params; |
| 168 | WindowCreateParamsInitialize(&win_params); |
| 169 | win_params.m_Width = 20; |
| 170 | win_params.m_Height = 10; |
| 171 | win_params.m_ContextAlphabits = 8; |
| 172 | |
| 173 | m_Window = dmPlatform::NewWindow(); |
| 174 | dmPlatform::OpenWindow(m_Window, win_params); |
| 175 | |
| 176 | dmGraphics::ContextParams graphics_context_params = {}; |
| 177 | graphics_context_params.m_Window = m_Window; |
| 178 | graphics_context_params.m_DefaultTextureMinFilter = dmGraphics::TEXTURE_FILTER_DEFAULT; |
| 179 | graphics_context_params.m_DefaultTextureMagFilter = dmGraphics::TEXTURE_FILTER_DEFAULT; |
| 180 | |
| 181 | m_GraphicsContext = dmGraphics::NewContext(graphics_context_params); |
| 182 | dmRender::RenderContextParams params; |
| 183 | dmScript::ContextParams script_context_params = {}; |
| 184 | script_context_params.m_GraphicsContext = m_GraphicsContext; |
| 185 | m_ScriptContext = dmScript::NewContext(script_context_params); |
| 186 | params.m_MaxRenderTargets = 1; |
| 187 | params.m_MaxInstances = 2; |
| 188 | params.m_ScriptContext = m_ScriptContext; |
| 189 | params.m_MaxDebugVertexCount = 256; |
| 190 | params.m_MaxCharacters = 256; |
| 191 | params.m_MaxBatches = 128; |
| 192 | m_Context = dmRender::NewRenderContext(m_GraphicsContext, params); |
| 193 | dmRender::SetLightBufferCount(m_Context, 32); |
| 194 | |
| 195 | m_GlyphBank = CreateGlyphBank(2, 1, 128); |
| 196 | m_Font = CreateGlyphBankFont("test.glyph_bankc", m_GlyphBank); |
| 197 | |
| 198 | printf("%s : %d\n", __FUNCTION__, __LINE__); |
| 199 | HFontCollection font_collection = FontCollectionCreate(); |
| 200 | FontCollectionAddFont(font_collection, m_Font); |
| 201 | |
| 202 | dmRender::FontMapParams font_map_params; |
| 203 | font_map_params.m_CacheWidth = 128; |
| 204 | font_map_params.m_CacheHeight = 128; |
| 205 | font_map_params.m_CacheCellWidth = 8; |
| 206 | font_map_params.m_CacheCellHeight = 8; |
| 207 | font_map_params.m_MaxAscent = 2; |
| 208 | font_map_params.m_MaxDescent = 1; |
| 209 | font_map_params.m_FontCollection = font_collection; |
| 210 | |
| 211 | printf("%s : %d\n", __FUNCTION__, __LINE__); |
| 212 | m_SystemFontMap = dmRender::NewFontMap(m_Context, m_GraphicsContext, font_map_params); |
| 213 | } |
| 214 | |
| 215 | void TearDown() override |
| 216 | { |
nothing calls this directly
no test coverage detected