Files
bearstonem--openmohaa-vr/code/renderercommon
bearstonemandClaude Opus 5 6f34f4524c feat(vr): put the headset behind the fixed function renderer
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>
2026-07-26 21:38:59 -07:00
..
2016-03-27 11:49:47 +02:00
2025-08-02 23:00:57 +02:00
2025-08-02 23:00:57 +02:00
2023-05-08 19:53:53 +02:00
2025-09-07 19:45:51 +02:00
2023-05-08 19:53:53 +02:00
2023-05-08 19:53:53 +02:00
2025-09-07 19:45:51 +02:00
2025-12-07 15:38:12 +01:00
2023-05-08 19:53:53 +02:00