Port the gl3 renderer to the new ref restart API.

This commit is contained in:
Yamagi 2021-04-10 18:41:14 +02:00
parent 09d645ab4b
commit a5102f47dd

View file

@ -373,9 +373,6 @@ GL3_SetMode(void)
fullscreen = (int)vid_fullscreen->value;
vid_fullscreen->modified = false;
r_mode->modified = false;
/* a bit hackish approach to enable custom resolutions:
Glimp_SetMode needs these values set for mode -1 */
vid.width = r_customwidth->value;
@ -1689,12 +1686,6 @@ GL3_Clear(void)
void
GL3_BeginFrame(float camera_separation)
{
/* change modes if necessary */
if (r_mode->modified)
{
vid_fullscreen->modified = true;
}
#if 0 // TODO: stereo stuff
gl_state.camera_separation = camera_separation;
// force a vid_restart if gl1_stereo has been modified.
@ -1878,6 +1869,10 @@ GetRefAPI(refimport_t imp)
re.EndWorldRenderpass = GL3_EndWorldRenderpass;
re.EndFrame = GL3_EndFrame;
// Tell the client that we're unsing the
// new renderer restart API.
ri.Vid_RequestRestart(RESTART_NO);
return re;
}