Added glFlush

to see if it helps with the weapon disappearing in the right eye issue
This commit is contained in:
Simon 2022-02-26 17:18:49 +00:00
parent 9489c0f106
commit f112cfe88a
4 changed files with 17 additions and 0 deletions

View file

@ -1773,6 +1773,12 @@ const void* RB_SwitchEye( const void* data ) {
if(tess.numIndexes)
RB_EndSurface();
if (r_useFlush->integer)
{
//FLush all open gl commands up to now
qglFlush();
}
// Not calling FBO_Bind explicitly, since we just update the frameBuffer
// within the struct.
if (tr.renderFbo == glState.currentFBO)

View file

@ -561,6 +561,12 @@ void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
R_IssueRenderCommands( qtrue );
if (r_useFlush->integer)
{
//FLush all open gl commands
qglFlush();
}
R_InitNextFrame();
if ( frontEndMsec ) {

View file

@ -60,6 +60,8 @@ cvar_t *r_znear;
cvar_t *r_zproj;
cvar_t *r_stereoSeparation;
cvar_t *r_useFlush;
cvar_t *r_skipBackEnd;
cvar_t *r_stereoEnabled;
@ -1307,6 +1309,7 @@ void R_Register( void )
ri.Cvar_CheckRange( r_znear, 0.001f, 200, qfalse );
r_zproj = ri.Cvar_Get( "r_zproj", "64", CVAR_ARCHIVE );
r_stereoSeparation = ri.Cvar_Get( "r_stereoSeparation", "64", CVAR_ARCHIVE );
r_useFlush = ri.Cvar_Get( "r_useFlush", "1", CVAR_ARCHIVE );
r_ignoreGLErrors = ri.Cvar_Get( "r_ignoreGLErrors", "1", CVAR_ARCHIVE );
r_fastsky = ri.Cvar_Get( "r_fastsky", "0", CVAR_ARCHIVE );
vr_deathCam = ri.Cvar_Get( "vr_deathCam", "0", CVAR_TEMP );

View file

@ -1692,6 +1692,8 @@ extern cvar_t *r_znear; // near Z clip plane
extern cvar_t *r_zproj; // z distance of projection plane
extern cvar_t *r_stereoSeparation; // separation of cameras for stereo rendering
extern cvar_t *r_useFlush; // whether an open gl glFlush is issued atthe end of each eye rendering
extern cvar_t *r_measureOverdraw; // enables stencil buffer overdraw measurement
extern cvar_t *r_lodbias; // push/pull LOD transitions