mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 19:29:58 +01:00
Hack to prevent font oversampling for low-memory graphics card.
This commit is contained in:
@@ -751,6 +751,8 @@ void ImGuiToolkit::SetFont(ImGuiToolkit::font_style style, const std::string &tt
|
|||||||
ImFontConfig font_config;
|
ImFontConfig font_config;
|
||||||
fontname.copy(font_config.Name, 40);
|
fontname.copy(font_config.Name, 40);
|
||||||
font_config.FontDataOwnedByAtlas = false; // data will be copied in font atlas
|
font_config.FontDataOwnedByAtlas = false; // data will be copied in font atlas
|
||||||
|
if ( max * max < 16777216 ) // hack: try to avoid font textures too larges by disabling oversamplig
|
||||||
|
oversample = 1;
|
||||||
font_config.OversampleH = CLAMP( oversample, 1, 5 );
|
font_config.OversampleH = CLAMP( oversample, 1, 5 );
|
||||||
font_config.OversampleV = CLAMP( oversample, 1, 5 );
|
font_config.OversampleV = CLAMP( oversample, 1, 5 );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user