mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Fixes setter issue for image/shape/material custom inspector fields where it was not correctly passing through the changed value from the Asset Browser select
Swapped the water's disableTrueReflections variable to be enableTrueReflections for simplicity and consistency(also fixed a persistent typo) Swapped disableVerticalSync to be enableVerticalSync for simplicity and consistency Swapped disableParallaxMapping to be enableParallaxMapping for simplicity and consistency Fix click detection on slider mode entries for guiGameSettingsCtrl so the click position correctly matches the percentage Fixed problem where postFX initialization would always exec default.postfxpreset.tscript, even if a level's got it's own preset, which can cause problems Fixed range field type behavior so that editing the values applies in real time, and also consistently applies between slider and text field
This commit is contained in:
parent
280fca2fbe
commit
cd82186231
20 changed files with 91 additions and 102 deletions
|
|
@ -228,7 +228,7 @@ DXGI_SWAP_CHAIN_DESC GFXD3D11Device::setupPresentParams(const GFXVideoMode &mode
|
|||
|
||||
mMultisampleDesc = sampleDesc;
|
||||
|
||||
d3dpp.BufferCount = !smDisableVSync ? 2 : 1; // triple buffering when vsync is on.
|
||||
d3dpp.BufferCount = smEnableVSync ? 2 : 1; // triple buffering when vsync is on.
|
||||
d3dpp.BufferDesc.Width = mode.resolution.x;
|
||||
d3dpp.BufferDesc.Height = mode.resolution.y;
|
||||
d3dpp.BufferDesc.Format = GFXD3D11TextureFormat[GFXFormatR8G8B8A8_SRGB];
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ GFXFormat GFXD3D11WindowTarget::getFormat()
|
|||
|
||||
bool GFXD3D11WindowTarget::present()
|
||||
{
|
||||
HRESULT hr = mSwapChain->Present(!D3D11->smDisableVSync, 0);
|
||||
HRESULT hr = mSwapChain->Present(D3D11->smEnableVSync, 0);
|
||||
if (hr == DXGI_ERROR_DEVICE_REMOVED)
|
||||
{
|
||||
HRESULT result = D3D11->getDevice()->GetDeviceRemovedReason();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
GFXDevice * GFXDevice::smGFXDevice = NULL;
|
||||
bool GFXDevice::smWireframe = false;
|
||||
bool GFXDevice::smDisableVSync = true;
|
||||
bool GFXDevice::smEnableVSync = false;
|
||||
F32 GFXDevice::smForcedPixVersion = -1.0f;
|
||||
bool GFXDevice::smDisableOcclusionQuery = false;
|
||||
bool gDisassembleAllShaders = false;
|
||||
|
|
@ -71,8 +71,8 @@ void GFXDevice::initConsole()
|
|||
"them to return only the visibile state.\n"
|
||||
"@ingroup GFX\n" );
|
||||
|
||||
Con::addVariable( "$pref::Video::disableVerticalSync", TypeBool, &smDisableVSync,
|
||||
"Disables vertical sync on the active device.\n"
|
||||
Con::addVariable( "$pref::Video::enableVerticalSync", TypeBool, &smEnableVSync,
|
||||
"Enables vertical sync on the active device.\n"
|
||||
"@note The video mode must be reset for the change to take affect.\n"
|
||||
"@ingroup GFX\n" );
|
||||
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ protected:
|
|||
static bool smWireframe;
|
||||
|
||||
/// The global vsync state.
|
||||
static bool smDisableVSync;
|
||||
static bool smEnableVSync;
|
||||
|
||||
/// The forced shader model version if non-zero.
|
||||
static F32 smForcedPixVersion;
|
||||
|
|
|
|||
|
|
@ -180,11 +180,11 @@ void GFXGLDevice::initGLState()
|
|||
}
|
||||
#endif
|
||||
|
||||
PlatformGL::setVSync(smDisableVSync ? 0 : 1);
|
||||
PlatformGL::setVSync(smEnableVSync);
|
||||
|
||||
//install vsync callback
|
||||
Con::NotifyDelegate clbk(this, &GFXGLDevice::vsyncCallback);
|
||||
Con::addVariableNotify("$pref::Video::disableVerticalSync", clbk);
|
||||
Con::addVariableNotify("$pref::Video::enableVerticalSync", clbk);
|
||||
|
||||
//OpenGL 3 need a binded VAO for render
|
||||
GLuint vao;
|
||||
|
|
@ -200,7 +200,7 @@ void GFXGLDevice::initGLState()
|
|||
|
||||
void GFXGLDevice::vsyncCallback()
|
||||
{
|
||||
PlatformGL::setVSync(smDisableVSync ? 0 : 1);
|
||||
PlatformGL::setVSync(smEnableVSync);
|
||||
}
|
||||
|
||||
GFXGLDevice::GFXGLDevice(U32 adapterIndex) :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue