Route render target binding through platform services

This commit is contained in:
2026-06-03 05:17:25 +02:00
parent 6652127545
commit 389cd93e68
10 changed files with 78 additions and 18 deletions

View File

@@ -620,11 +620,7 @@ void App::draw(float dt)
if (!vr_only)
{
#if __IOS__
[ios_view->glview bindDrawable];
#else
glBindFramebuffer(framebuffer_target(), default_framebuffer_id());
#endif
bind_main_render_target();
glViewport(off_x, off_y, (GLsizei)width, (GLsizei)height);
glEnable(scissor_test_state());
for (int i = 0; i < layout[main_id]->m_children.size(); i++)
@@ -947,7 +943,7 @@ void App::ui_thread_tick()
update(0);
render_task([this]
{
glBindFramebuffer(framebuffer_target(), default_framebuffer_id());
bind_default_render_target();
clear();
draw(0);
async_swap();
@@ -1039,7 +1035,7 @@ void App::ui_thread_main()
update(t_frame);
render_task([this, t_frame]
{
glBindFramebuffer(framebuffer_target(), default_framebuffer_id());
bind_default_render_target();
clear();
draw(t_frame);
async_swap();