mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Port the gl1 renderer to the new ref restart API.
This commit is contained in:
parent
27a021eb7c
commit
01fa2cfc1c
1 changed files with 4 additions and 9 deletions
|
@ -1323,9 +1323,6 @@ R_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;
|
||||
|
@ -1582,12 +1579,6 @@ RI_BeginFrame(float camera_separation)
|
|||
{
|
||||
gl_state.camera_separation = camera_separation;
|
||||
|
||||
/* change modes if necessary */
|
||||
if (r_mode->modified)
|
||||
{
|
||||
vid_fullscreen->modified = true;
|
||||
}
|
||||
|
||||
// force a vid_restart if gl1_stereo has been modified.
|
||||
if ( gl_state.stereo_mode != gl1_stereo->value ) {
|
||||
// If we've gone from one mode to another with the same special buffer requirements there's no need to restart.
|
||||
|
@ -1933,6 +1924,10 @@ GetRefAPI(refimport_t imp)
|
|||
re.EndWorldRenderpass = RI_EndWorldRenderpass;
|
||||
re.EndFrame = RI_EndFrame;
|
||||
|
||||
// Tell the client that we're unsing the
|
||||
// new renderer restart API.
|
||||
ri.Vid_RequestRestart(RESTART_NO);
|
||||
|
||||
return re;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue