mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
1eaee11299
The opengl backend now creates a genuine OpenGL context and presents through it. Verified: Tomba boots and renders gameplay correctly via GL (context "4.6.0 NVIDIA"), pixel-identical to software. - gpu_gl_renderer.c: gl_renderer_init_context (SDL_GL context on a SDL_WINDOW_OPENGL window), gl_renderer_present (upload ARGB image -> GL texture -> full-screen quad -> SDL_GL_SwapWindow), present_blank, shutdown. Legacy GL 1.x (immediate mode) so no GL loader needed yet (-lopengl32). Backend vtable still delegates rasterization to sw_* this phase, so the GL path is pixel-identical — this isolates/validates the context+present. - main.cpp: window gains SDL_WINDOW_OPENGL when renderer=opengl; GL context created with graceful fallback to the SDL_Renderer path on failure; present + disabled-frame + cleanup branch on g_gl_active. SW path untouched. - runtime.cmake: link opengl32 (Win) / OpenGL::GL (other). Phase 2b (next): move rasterization onto the GPU — VRAM as a GL texture/FBO, modern-GL loader + shaders, primitives at internal resolution (the actual scaling-without-perf-loss win). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>