| 110 | dmRender::HComputeProgram m_Compute; |
| 111 | |
| 112 | void SetUp() override |
| 113 | { |
| 114 | dmGraphics::InstallAdapter(dmGraphics::ADAPTER_FAMILY_NONE); |
| 115 | |
| 116 | WindowCreateParams win_params; |
| 117 | WindowCreateParamsInitialize(&win_params); |
| 118 | win_params.m_Width = 20; |
| 119 | win_params.m_Height = 10; |
| 120 | win_params.m_ContextAlphabits = 8; |
| 121 | |
| 122 | m_Window = dmPlatform::NewWindow(); |
| 123 | dmPlatform::OpenWindow(m_Window, win_params); |
| 124 | |
| 125 | dmGraphics::ContextParams graphics_context_params; |
| 126 | graphics_context_params.m_Width = 20; |
| 127 | graphics_context_params.m_Height = 10; |
| 128 | graphics_context_params.m_Window = m_Window; |
| 129 | |
| 130 | m_GraphicsContext = dmGraphics::NewContext(graphics_context_params); |
| 131 | |
| 132 | dmScript::ContextParams script_context_params = {}; |
| 133 | script_context_params.m_GraphicsContext = m_GraphicsContext; |
| 134 | m_ScriptContext = dmScript::NewContext(script_context_params); |
| 135 | dmScript::Initialize(m_ScriptContext); |
| 136 | |
| 137 | m_GlyphBank = CreateGlyphBank(1, 1, 128); |
| 138 | m_Font = CreateGlyphBankFont("test.glyph_bankc", m_GlyphBank); |
| 139 | |
| 140 | HFontCollection font_collection = FontCollectionCreate(); |
| 141 | FontCollectionAddFont(font_collection, m_Font); |
| 142 | |
| 143 | dmRender::FontMapParams font_map_params; |
| 144 | font_map_params.m_CacheWidth = 128; |
| 145 | font_map_params.m_CacheHeight = 128; |
| 146 | font_map_params.m_CacheCellWidth = 8; |
| 147 | font_map_params.m_CacheCellHeight = 8; |
| 148 | font_map_params.m_FontCollection = font_collection; |
| 149 | |
| 150 | m_SystemFontMap = dmRender::NewFontMap(m_Context, m_GraphicsContext, font_map_params); |
| 151 | |
| 152 | dmRender::RenderContextParams params; |
| 153 | params.m_ScriptContext = m_ScriptContext; |
| 154 | params.m_SystemFontMap = m_SystemFontMap; |
| 155 | params.m_MaxRenderTargets = 1; |
| 156 | params.m_MaxInstances = 64; |
| 157 | params.m_MaxCharacters = 32; |
| 158 | params.m_MaxBatches = 128; |
| 159 | m_Context = dmRender::NewRenderContext(m_GraphicsContext, params); |
| 160 | |
| 161 | dmGraphics::ShaderDescBuilder shader_desc_builder; |
| 162 | shader_desc_builder.AddShader(dmGraphics::ShaderDesc::SHADER_TYPE_VERTEX, dmGraphics::ShaderDesc::LANGUAGE_GLSL_SM330, "foo", 3); |
| 163 | shader_desc_builder.AddShader(dmGraphics::ShaderDesc::SHADER_TYPE_FRAGMENT, dmGraphics::ShaderDesc::LANGUAGE_GLSL_SM330, "foo", 3); |
| 164 | |
| 165 | dmGraphics::ShaderDesc* shader_desc = shader_desc_builder.Get(); |
| 166 | m_FontProgram = dmGraphics::NewProgram(m_GraphicsContext, shader_desc, 0, 0); |
| 167 | |
| 168 | m_FontMaterial = dmRender::NewMaterial(m_Context, m_FontProgram); |
| 169 | dmRender::SetFontMapMaterial(m_SystemFontMap, m_FontMaterial); |
nothing calls this directly
no test coverage detected