Font maps have no mips, so we need to make sure we use a supported min filter
| 65 | |
| 66 | // Font maps have no mips, so we need to make sure we use a supported min filter |
| 67 | static dmGraphics::TextureFilter ConvertMinTextureFilter(dmGraphics::TextureFilter filter) |
| 68 | { |
| 69 | if (filter == dmGraphics::TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST) |
| 70 | { |
| 71 | filter = dmGraphics::TEXTURE_FILTER_NEAREST; |
| 72 | } |
| 73 | else if (filter == dmGraphics::TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST) |
| 74 | { |
| 75 | filter = dmGraphics::TEXTURE_FILTER_LINEAR; |
| 76 | } |
| 77 | |
| 78 | return filter; |
| 79 | } |
| 80 | |
| 81 | static void SetupCache(HFontMap font_map, uint32_t texture_width, uint32_t texture_height, |
| 82 | uint32_t cell_width, uint32_t cell_height, uint32_t max_ascent) |