mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-25 06:00:30 +01:00
Everything the VR work had built so far lived in renderergl2. This carries it across to renderergl1, which is the renderer the port is moving to. Most of it transfers unchanged: the head pose composed onto whatever camera the game asked for (R_ApplyVRView, in RE_RenderScene so it follows cutscenes and ladders as well as the player), the asymmetric per-eye frustum and vr_fovZoom in R_SetupProjection, the eye render resolution asked for through GetVRRenderResolution rather than r_mode, and the sprite paths that face the viewer's position rather than the view plane. Two places came out simpler than rend2. Everything 2D in this renderer goes through Set2DWindow - RB_SetGL2D is a one line call to it - so the HUD's convergence has a single place to be applied rather than two that had to be kept in agreement. And RE_SetDefaultFramebuffer is nearly nothing: renderergl1 predates framebuffer objects, has none of its own and never touches the binding, so redirecting an eye is one bind with no FBO_Bind to intercept and nothing to restore. glBindFramebuffer is resolved on first use rather than declared with the rest of qgl, because renderergl1 has no extension probe of its own - it goes through GLimp_GetProcAddress so it reaches gl4es like everything else the renderer calls, and gl4es stays aware of which framebuffer is bound. renderergl2 still builds and is unchanged in behaviour. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>