mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Fixed issue with FrameSetup being called in the wrong place
this seemed to limit the correctly submitted frames to 60 fps!
This commit is contained in:
parent
16299b3f8a
commit
57ebeb79e2
9 changed files with 16 additions and 31 deletions
|
@ -85,15 +85,7 @@ void I_StartTic ()
|
||||||
I_GetEvent ();
|
I_GetEvent ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TBXR_FrameSetup();
|
|
||||||
void TBXR_prepareEyeBuffer(int);
|
|
||||||
bool TBXR_IsFrameSetup();
|
|
||||||
void I_StartFrame ()
|
void I_StartFrame ()
|
||||||
{
|
{
|
||||||
if (TBXR_IsFrameSetup())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TBXR_FrameSetup();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,6 @@ void FGLRenderer::Flush()
|
||||||
int eyeCount = vrmode->mEyeCount;
|
int eyeCount = vrmode->mEyeCount;
|
||||||
for (int eye_ix = 0; eye_ix < eyeCount; ++eye_ix)
|
for (int eye_ix = 0; eye_ix < eyeCount; ++eye_ix)
|
||||||
{
|
{
|
||||||
screen->RenderState()->SetEye(eye_ix); // tell render state which eye's 2D we are drawing
|
|
||||||
screen->Draw2D();
|
screen->Draw2D();
|
||||||
if (eyeCount - eye_ix > 1)
|
if (eyeCount - eye_ix > 1)
|
||||||
mBuffers->NextEye(eyeCount);
|
mBuffers->NextEye(eyeCount);
|
||||||
|
|
|
@ -216,7 +216,6 @@ protected:
|
||||||
uint8_t mSplitEnabled : 1;
|
uint8_t mSplitEnabled : 1;
|
||||||
uint8_t mBrightmapEnabled : 1;
|
uint8_t mBrightmapEnabled : 1;
|
||||||
|
|
||||||
int mEye;
|
|
||||||
int mLightIndex;
|
int mLightIndex;
|
||||||
int mBoneIndexBase;
|
int mBoneIndexBase;
|
||||||
int mSpecialEffect;
|
int mSpecialEffect;
|
||||||
|
@ -257,7 +256,6 @@ public:
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
mEye = 0;
|
|
||||||
mTextureEnabled = true;
|
mTextureEnabled = true;
|
||||||
mBrightmapEnabled = mGradientEnabled = mFogEnabled = mGlowEnabled = false;
|
mBrightmapEnabled = mGradientEnabled = mFogEnabled = mGlowEnabled = false;
|
||||||
mFogColor = 0xffffffff;
|
mFogColor = 0xffffffff;
|
||||||
|
@ -314,11 +312,6 @@ public:
|
||||||
ClearClipSplit();
|
ClearClipSplit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetEye(int eye)
|
|
||||||
{
|
|
||||||
mEye = eye;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetNormal(FVector3 norm)
|
void SetNormal(FVector3 norm)
|
||||||
{
|
{
|
||||||
mStreamData.uVertexNormal = { norm.X, norm.Y, norm.Z, 0.f };
|
mStreamData.uVertexNormal = { norm.X, norm.Y, norm.Z, 0.f };
|
||||||
|
@ -616,11 +609,6 @@ public:
|
||||||
mBias.mUnits = 0;
|
mBias.mUnits = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetEye()
|
|
||||||
{
|
|
||||||
return mEye;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetMaterial(FMaterial *mat, int clampmode, int translation, int overrideshader)
|
void SetMaterial(FMaterial *mat, int clampmode, int translation, int overrideshader)
|
||||||
{
|
{
|
||||||
|
|
|
@ -252,6 +252,11 @@ void DFrameBuffer::ScaleCoordsFromWindow(int16_t &x, int16_t &y)
|
||||||
|
|
||||||
void DFrameBuffer::FPSLimit()
|
void DFrameBuffer::FPSLimit()
|
||||||
{
|
{
|
||||||
|
//We don't need to limit FPS
|
||||||
|
#ifdef __MOBILE__
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
using namespace std::this_thread;
|
using namespace std::this_thread;
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ CVARD(Bool, cl_loadingscreens, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/dis
|
||||||
CVARD(Bool, cl_clampedpitch, true, CVAR_ARCHIVE, "clamp the view pitch to original ranges")
|
CVARD(Bool, cl_clampedpitch, true, CVAR_ARCHIVE, "clamp the view pitch to original ranges")
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim")
|
CUSTOM_CVARD(Int, cl_autoaim, 0, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim")
|
||||||
{
|
{
|
||||||
int automodes = (g_gameType & (GAMEFLAG_DUKECOMPAT | GAMEFLAG_BLOOD | GAMEFLAG_SW)) ? 2 : 1;
|
int automodes = (g_gameType & (GAMEFLAG_DUKECOMPAT | GAMEFLAG_BLOOD | GAMEFLAG_SW)) ? 2 : 1;
|
||||||
if (self < 0 || self > automodes) self = 1;
|
if (self < 0 || self > automodes) self = 1;
|
||||||
|
|
|
@ -408,6 +408,7 @@ void DrawOverlays()
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
CVAR(String, drawtile, "", 0) // debug stuff. Draws the tile with the given number on top of thze HUD
|
CVAR(String, drawtile, "", 0) // debug stuff. Draws the tile with the given number on top of thze HUD
|
||||||
|
|
||||||
|
void TBXR_FrameSetup();
|
||||||
void Display()
|
void Display()
|
||||||
{
|
{
|
||||||
if (screen == nullptr || (!AppActive && (screen->IsFullscreen() || !vid_activeinbackground)))
|
if (screen == nullptr || (!AppActive && (screen->IsFullscreen() || !vid_activeinbackground)))
|
||||||
|
@ -415,6 +416,8 @@ void Display()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TBXR_FrameSetup();
|
||||||
|
|
||||||
FTexture* wipestart = nullptr;
|
FTexture* wipestart = nullptr;
|
||||||
if (nextwipe != wipe_None)
|
if (nextwipe != wipe_None)
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,8 +148,6 @@ void RenderViewpoint(FRenderViewpoint& mainvp, IntRect* bounds, float fov, float
|
||||||
const auto& eye = vrmode->mEyes[eye_ix];
|
const auto& eye = vrmode->mEyes[eye_ix];
|
||||||
screen->SetViewportRects(bounds);
|
screen->SetViewportRects(bounds);
|
||||||
|
|
||||||
screen->RenderState()->SetEye(eye_ix);
|
|
||||||
|
|
||||||
if (mainview) // Bind the scene frame buffer and turn on draw buffers used by ssao
|
if (mainview) // Bind the scene frame buffer and turn on draw buffers used by ssao
|
||||||
{
|
{
|
||||||
bool useSSAO = (gl_ssao != 0);
|
bool useSSAO = (gl_ssao != 0);
|
||||||
|
|
|
@ -44,7 +44,7 @@ const char *GetVersionString();
|
||||||
|
|
||||||
#define VERSIONSTR "1.7pre"
|
#define VERSIONSTR "1.7pre"
|
||||||
|
|
||||||
#define RAZEXR_VERSIONSTR "RazeXR 0.2.0"
|
#define RAZEXR_VERSIONSTR "RazeXR 0.2.1"
|
||||||
|
|
||||||
// The version as seen in the Windows resource
|
// The version as seen in the Windows resource
|
||||||
#define RC_FILEVERSION 1,6,9999,0
|
#define RC_FILEVERSION 1,6,9999,0
|
||||||
|
|
|
@ -548,8 +548,8 @@ OptionMenu "VROptionsMenu" protected
|
||||||
{
|
{
|
||||||
Title "VR Options"
|
Title "VR Options"
|
||||||
StaticText ""
|
StaticText ""
|
||||||
//Option "Control Scheme", "vr_control_scheme", "ControlScheme"
|
Option "Control Scheme", "vr_control_scheme", "ControlScheme"
|
||||||
//Option "Switch Sticks", "vr_switch_sticks", "YesNo"
|
Option "Switch Sticks", "vr_switch_sticks", "YesNo"
|
||||||
StaticText ""
|
StaticText ""
|
||||||
Option "Turning Mode", "vr_snapTurn", "TurningMode"
|
Option "Turning Mode", "vr_snapTurn", "TurningMode"
|
||||||
Option "Direction Mode", "vr_move_use_offhand", "DirectionMode"
|
Option "Direction Mode", "vr_move_use_offhand", "DirectionMode"
|
||||||
|
@ -1744,9 +1744,9 @@ OptionMenu VideoModeMenu protected
|
||||||
Option "$VIDMNU_SCALEMODE", "vid_scalemode", "ScaleModes"
|
Option "$VIDMNU_SCALEMODE", "vid_scalemode", "ScaleModes"
|
||||||
Slider "$VIDMNU_SCALEFACTOR", "vid_scalefactor", 0.25, 2.0, 0.25, 2
|
Slider "$VIDMNU_SCALEFACTOR", "vid_scalefactor", 0.25, 2.0, 0.25, 2
|
||||||
|
|
||||||
StaticText " "
|
// StaticText " "
|
||||||
Option "$DSPLYMNU_VSYNC", "vid_vsync", "OnOff"
|
// Option "$DSPLYMNU_VSYNC", "vid_vsync", "OnOff"
|
||||||
Option "$VIDMNU_MAXFPS", "vid_maxfps", "MaxFps"
|
// Option "$VIDMNU_MAXFPS", "vid_maxfps", "MaxFps"
|
||||||
|
|
||||||
StaticText ""
|
StaticText ""
|
||||||
StaticText "$VIDMNU_CUSTOMRES"
|
StaticText "$VIDMNU_CUSTOMRES"
|
||||||
|
|
Loading…
Reference in a new issue