mirror of
https://github.com/DrBeef/Doom3Quest.git
synced 2024-11-10 06:41:36 +00:00
Couple of small things
- New EndFrame function on Game - Ensure any of the view effects render in fake mono (it is still stereo rendering to the single back buffer, but separation is now zero).
This commit is contained in:
parent
a224e7424b
commit
7fead4caeb
7 changed files with 24 additions and 3 deletions
|
@ -2460,6 +2460,9 @@ void idCommonLocal::Frame( void ) {
|
|||
session->UpdateScreen( false );
|
||||
}
|
||||
|
||||
//In case game library wants to do anything at the end of the frame
|
||||
game->EndFrame();
|
||||
|
||||
/*
|
||||
// process the rumble
|
||||
for(int i = 0; i < 2; i++) {
|
||||
|
|
|
@ -163,6 +163,9 @@ public:
|
|||
// Runs a game frame, may return a session command for level changing, etc
|
||||
virtual gameReturn_t RunFrame( const usercmd_t *clientCmds ) = 0;
|
||||
|
||||
// Indicates to the game library that the frame has now ended
|
||||
virtual void EndFrame() = 0;
|
||||
|
||||
// Makes rendering and sound system calls to display for a given clientNum.
|
||||
virtual bool Draw( int clientNum ) = 0;
|
||||
|
||||
|
|
|
@ -2698,6 +2698,16 @@ void idGameLocal::SortActiveEntityList( void ) {
|
|||
sortPushers = false;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idGameLocal::RunFrame
|
||||
================
|
||||
*/
|
||||
void idGameLocal::EndFrame()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idGameLocal::RunFrame
|
||||
|
|
|
@ -379,6 +379,7 @@ public:
|
|||
virtual void CacheDictionaryMedia( const idDict *dict );
|
||||
virtual void SpawnPlayer( int clientNum );
|
||||
virtual gameReturn_t RunFrame( const usercmd_t *clientCmds );
|
||||
virtual void EndFrame();
|
||||
virtual bool Draw( int clientNum );
|
||||
virtual escReply_t HandleESC( idUserInterface **gui );
|
||||
virtual idUserInterface *StartMenu( void );
|
||||
|
|
|
@ -766,18 +766,20 @@ idPlayerView::RenderPlayerView
|
|||
===================
|
||||
*/
|
||||
void idPlayerView::RenderPlayerView( idUserInterface *hud ) {
|
||||
const renderView_t *view = player->GetRenderView();
|
||||
renderView_t *view = player->GetRenderView();
|
||||
|
||||
if (g_skipViewEffects.GetBool()) {
|
||||
SingleView( hud, view );
|
||||
} else {
|
||||
if (player->GetInfluenceMaterial() || player->GetInfluenceEntity()) {
|
||||
view->forceMono = true;
|
||||
if (player->GetInfluenceMaterial() || player->GetInfluenceEntity()) {
|
||||
InfluenceVision( hud, view );
|
||||
} else if (gameLocal.time < dvFinishTime) {
|
||||
DoubleVision( hud, view, dvFinishTime - gameLocal.time );
|
||||
} else if (player->PowerUpActive(BERSERK)) {
|
||||
BerserkVision( hud, view );
|
||||
} else {
|
||||
view->forceMono = false;
|
||||
SingleView( hud, view );
|
||||
}
|
||||
ScreenFade();
|
||||
|
|
|
@ -241,6 +241,7 @@ typedef struct renderView_s {
|
|||
|
||||
bool cramZNear; // for cinematics, we want to set ZNear much lower
|
||||
bool forceUpdate; // for an update
|
||||
bool forceMono; // force mono
|
||||
|
||||
// time in milliseconds for shader effects and other time dependent rendering issues
|
||||
int time;
|
||||
|
|
|
@ -881,7 +881,8 @@ void R_SetViewMatrix( viewDef_t *viewDef ) {
|
|||
|
||||
|
||||
if (eye < 2 &&
|
||||
!Doom3Quest_useScreenLayer())
|
||||
!Doom3Quest_useScreenLayer() &&
|
||||
!viewDef->renderView.forceMono)
|
||||
{
|
||||
origin += (eye == 0 ? 1.0f : -1.0f) * viewDef->renderView.viewaxis[1] *
|
||||
(cvarSystem->GetCVarFloat("vr_ipd") / 2.0f) *
|
||||
|
|
Loading…
Reference in a new issue