mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- added VR mode init code as this is actually functional with the new renderer.
Also moved a few things out of gl_texture.cpp as this file is scheduled to go away with Polymost.
This commit is contained in:
parent
7c4e9ea87e
commit
e098e0ca2e
4 changed files with 34 additions and 17 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "v_video.h"
|
||||
|
||||
static IHardwareTexture* (*layercallback)(int layer, int translation);
|
||||
TArray<UserShaderDesc> usershaders;
|
||||
|
||||
void FMaterial::SetLayerCallback(IHardwareTexture* (*cb)(int layer, int translation))
|
||||
{
|
||||
|
|
|
@ -1412,3 +1412,10 @@ DEFINE_GLOBAL(gameaction)
|
|||
DEFINE_GLOBAL(gamestate)
|
||||
DEFINE_GLOBAL(demoplayback)
|
||||
DEFINE_GLOBAL(consoleplayer)
|
||||
|
||||
|
||||
void InitBuildTiles()
|
||||
{
|
||||
// need to find a better way to handle this thing.
|
||||
}
|
||||
|
||||
|
|
|
@ -731,3 +731,29 @@ DEFINE_ACTION_FUNCTION(_PlayerMenu, DrawPlayerSprite)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
EXTERN_CVAR(Bool, vr_enable_quadbuffered)
|
||||
#endif
|
||||
|
||||
void UpdateVRModes(bool considerQuadBuffered)
|
||||
{
|
||||
FOptionValues** pVRModes = OptionValues.CheckKey("VRMode");
|
||||
if (pVRModes == nullptr) return;
|
||||
|
||||
TArray<FOptionValues::Pair>& vals = (*pVRModes)->mValues;
|
||||
TArray<FOptionValues::Pair> filteredValues;
|
||||
int cnt = vals.Size();
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
auto const& mode = vals[i];
|
||||
if (mode.Value == 7) { // Quad-buffered stereo
|
||||
#ifdef _WIN32
|
||||
if (!vr_enable_quadbuffered) continue;
|
||||
#else
|
||||
continue; // Remove quad-buffered option on Mac and Linux
|
||||
#endif
|
||||
if (!considerQuadBuffered) continue; // Probably no compatible screen mode was found
|
||||
}
|
||||
filteredValues.Push(mode);
|
||||
}
|
||||
vals = filteredValues;
|
||||
}
|
||||
|
|
|
@ -86,20 +86,3 @@ bool GLInstance::SetTexture(FGameTexture* tex, int paletteid, int sampler, bool
|
|||
return true;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// stand-ins for the texture system. Nothing of this is used right now, but needs to be present to satisfy the linker
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void InitBuildTiles()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
TArray<UserShaderDesc> usershaders;
|
||||
|
||||
void UpdateVRModes(bool considerQuadBuffered = true)
|
||||
{
|
||||
// should update the menu.
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue