feat: 添加自适应同步和三缓冲支持,优化渲染配置

This commit is contained in:
daiqingshuang
2025-12-08 16:22:55 +08:00
parent 91dc9a119b
commit 65ed021c7e
18 changed files with 168 additions and 62 deletions

View File

@@ -20,14 +20,16 @@ int main(int argc, char* argv[]) {
config.target_fps = 240;
config.enable_validation = true;
config.vsync = true;
config.triple_buffering = false;
config.adaptive_sync = true;
if (!app.initialize(config)) {
return -1;
}
// auto texture_id = app.texture_mgr()->load_texture("D:\\G2uY1fJa8AAOucs.jpg").value();
auto texture_id = app.texture_mgr()->load_texture("D:\\screenshot-20251128-165627.png").value();
auto tex_size = app.texture_mgr()->get_texture(texture_id)->size().cast<float>();
auto texture_id = app.texture_mgr()->load_texture("D:\\screenshot-20251128-165627.png").value();
auto tex_size = app.texture_mgr()->get_texture(texture_id)->size().cast<float>();
auto root_widget = new_widget<scroll_box>()[
new_widget<overlay>()[