| 148 | } |
| 149 | |
| 150 | static void RecreateTexture(HFontMap font_map, dmGraphics::HContext graphics_context, uint32_t width, uint32_t height) |
| 151 | { |
| 152 | // create new texture to be used as a cache |
| 153 | dmGraphics::TextureCreationParams tex_create_params; |
| 154 | tex_create_params.m_Width = width; |
| 155 | tex_create_params.m_Height = height; |
| 156 | tex_create_params.m_OriginalWidth = width; |
| 157 | tex_create_params.m_OriginalHeight = height; |
| 158 | |
| 159 | if (font_map->m_Texture) |
| 160 | { |
| 161 | dmGraphics::DeleteTexture(graphics_context, font_map->m_Texture); |
| 162 | } |
| 163 | font_map->m_Texture = dmGraphics::NewTexture(graphics_context, tex_create_params); |
| 164 | |
| 165 | ClearTexture(font_map, width, height); |
| 166 | } |
| 167 | |
| 168 | /** |
| 169 | * Update the font map with the specified parameters. The parameters are consumed and should not be read after this call. |
no test coverage detected