mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 14:24:10 +08:00
Using WindowManager to begin and end frame
This commit is contained in:
@@ -36,7 +36,7 @@ TTF_Font* FontManager::loadFont(const std::string& fontID, int ptSize) {
|
||||
// 字体加载失败,抛出异常
|
||||
throw std::runtime_error("无法加载字体: " + fontID);
|
||||
}
|
||||
|
||||
TTF_SetFontHinting(font, TTF_HINTING_MONO); // 单色渲染,不抗锯齿
|
||||
// 将新加载的字体存入缓存
|
||||
m_fonts[key] = font;
|
||||
return font;
|
||||
|
||||
@@ -91,7 +91,7 @@ TextRenderer::CachedText TextRenderer::createAndCacheTexture(const std::string&
|
||||
SDL_Log("错误:无法创建纹理\n");
|
||||
return result;
|
||||
}
|
||||
|
||||
SDL_SetTextureScaleMode(texture, SDL_SCALEMODE_NEAREST);
|
||||
// 保存结果
|
||||
result.texture = texture;
|
||||
result.width = width;
|
||||
|
||||
Reference in New Issue
Block a user