Merge remote-tracking branch 'shyotl/master'
This commit is contained in:
@@ -105,7 +105,7 @@ LLPanelDisplay::LLPanelDisplay()
|
|||||||
BOOL LLPanelDisplay::postBuild()
|
BOOL LLPanelDisplay::postBuild()
|
||||||
{
|
{
|
||||||
// return to default values
|
// return to default values
|
||||||
childSetAction("Defaults", setHardwareDefaults, NULL);
|
getChild<LLButton>("Defaults")->setClickedCallback(boost::bind(&LLPanelDisplay::setHardwareDefaults));
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
// Resolution
|
// Resolution
|
||||||
@@ -113,8 +113,7 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
// radio set for fullscreen size
|
// radio set for fullscreen size
|
||||||
|
|
||||||
mCtrlWindowed = getChild<LLCheckBoxCtrl>( "windowed mode");
|
mCtrlWindowed = getChild<LLCheckBoxCtrl>( "windowed mode");
|
||||||
mCtrlWindowed->setCommitCallback(&LLPanelDisplay::onCommitWindowedMode);
|
mCtrlWindowed->setCommitCallback(boost::bind(&LLPanelDisplay::onCommitWindowedMode,this));
|
||||||
mCtrlWindowed->setCallbackUserData(this);
|
|
||||||
|
|
||||||
mAspectRatioLabel1 = getChild<LLTextBox>("AspectRatioLabel1");
|
mAspectRatioLabel1 = getChild<LLTextBox>("AspectRatioLabel1");
|
||||||
mDisplayResLabel = getChild<LLTextBox>("DisplayResLabel");
|
mDisplayResLabel = getChild<LLTextBox>("DisplayResLabel");
|
||||||
@@ -194,25 +193,22 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mCtrlAspectRatio = getChild<LLComboBox>( "aspect_ratio");
|
mCtrlAspectRatio = getChild<LLComboBox>( "aspect_ratio");
|
||||||
mCtrlAspectRatio->setTextEntryCallback(onKeystrokeAspectRatio);
|
mCtrlAspectRatio->setTextEntryCallback(&LLPanelDisplay::onKeystrokeAspectRatio);
|
||||||
mCtrlAspectRatio->setCommitCallback(onSelectAspectRatio);
|
mCtrlAspectRatio->setCallbackUserData(this);
|
||||||
mCtrlAspectRatio->setCallbackUserData(this);
|
mCtrlAspectRatio->setCommitCallback(boost::bind(&LLPanelDisplay::onSelectAspectRatio,this));
|
||||||
// add default aspect ratios
|
// add default aspect ratios
|
||||||
mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP);
|
mCtrlAspectRatio->add(aspect_ratio_text, &mAspectRatio, ADD_TOP);
|
||||||
mCtrlAspectRatio->setCurrentByIndex(0);
|
mCtrlAspectRatio->setCurrentByIndex(0);
|
||||||
|
|
||||||
mCtrlAutoDetectAspect = getChild<LLCheckBoxCtrl>( "aspect_auto_detect");
|
mCtrlAutoDetectAspect = getChild<LLCheckBoxCtrl>( "aspect_auto_detect");
|
||||||
mCtrlAutoDetectAspect->setCommitCallback(onCommitAutoDetectAspect);
|
mCtrlAutoDetectAspect->setCommitCallback(boost::bind(&LLPanelDisplay::onCommitAutoDetectAspect,this,_2));
|
||||||
mCtrlAutoDetectAspect->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// radio performance box
|
// radio performance box
|
||||||
mCtrlSliderQuality = getChild<LLSliderCtrl>("QualityPerformanceSelection");
|
mCtrlSliderQuality = getChild<LLSliderCtrl>("QualityPerformanceSelection");
|
||||||
mCtrlSliderQuality->setSliderMouseUpCallback(boost::bind(&LLPanelDisplay::onChangeQuality,mCtrlSliderQuality,this));
|
mCtrlSliderQuality->setSliderMouseUpCallback(boost::bind(&LLPanelDisplay::onChangeQuality,this,_1));
|
||||||
mCtrlSliderQuality->setCallbackUserData(this);
|
|
||||||
|
|
||||||
mCtrlCustomSettings = getChild<LLCheckBoxCtrl>("CustomSettings");
|
mCtrlCustomSettings = getChild<LLCheckBoxCtrl>("CustomSettings");
|
||||||
mCtrlCustomSettings->setCommitCallback(onChangeCustom);
|
mCtrlCustomSettings->setCommitCallback(boost::bind(&LLPanelDisplay::onChangeCustom));
|
||||||
mCtrlCustomSettings->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//mGraphicsBorder = getChild<LLViewBorder>("GraphicsBorder");
|
//mGraphicsBorder = getChild<LLViewBorder>("GraphicsBorder");
|
||||||
|
|
||||||
@@ -226,24 +222,19 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Enable Reflections
|
// Enable Reflections
|
||||||
mCtrlReflectionDetail = getChild<LLComboBox>("ReflectionDetailCombo");
|
mCtrlReflectionDetail = getChild<LLComboBox>("ReflectionDetailCombo");
|
||||||
mCtrlReflectionDetail->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlReflectionDetail->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlReflectionDetail->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// WindLight
|
// WindLight
|
||||||
mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
|
||||||
mCtrlWindLight->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlWindLight->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlWindLight->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// Deferred
|
// Deferred
|
||||||
mCtrlDeferred = getChild<LLCheckBoxCtrl>("RenderDeferred");
|
mCtrlDeferred = getChild<LLCheckBoxCtrl>("RenderDeferred");
|
||||||
mCtrlDeferred->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlDeferred->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlDeferred->setCallbackUserData(this);
|
|
||||||
mCtrlDeferredDoF = getChild<LLCheckBoxCtrl>("RenderDepthOfField");
|
mCtrlDeferredDoF = getChild<LLCheckBoxCtrl>("RenderDepthOfField");
|
||||||
mCtrlDeferredDoF->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlDeferredDoF->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlDeferredDoF->setCallbackUserData(this);
|
|
||||||
mCtrlShadowDetail = getChild<LLComboBox>("ShadowDetailCombo");
|
mCtrlShadowDetail = getChild<LLComboBox>("ShadowDetailCombo");
|
||||||
mCtrlShadowDetail->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlShadowDetail->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlShadowDetail->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Terrain Scale
|
// Terrain Scale
|
||||||
@@ -252,15 +243,13 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Enable Avatar Shaders
|
// Enable Avatar Shaders
|
||||||
mCtrlAvatarVP = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
|
mCtrlAvatarVP = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
|
||||||
mCtrlAvatarVP->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlAvatarVP->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlAvatarVP->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Avatar Render Mode
|
// Avatar Render Mode
|
||||||
mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
|
mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
|
||||||
mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
|
mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
|
||||||
mCtrlAvatarImpostors->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlAvatarImpostors->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlAvatarImpostors->setCallbackUserData(this);
|
|
||||||
mCtrlNonImpostors = getChild<LLSliderCtrl>("AvatarMaxVisible");
|
mCtrlNonImpostors = getChild<LLSliderCtrl>("AvatarMaxVisible");
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@@ -278,8 +267,7 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Global Shader Enable
|
// Global Shader Enable
|
||||||
mCtrlShaderEnable = getChild<LLCheckBoxCtrl>("BasicShaders");
|
mCtrlShaderEnable = getChild<LLCheckBoxCtrl>("BasicShaders");
|
||||||
mCtrlShaderEnable->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable);
|
mCtrlShaderEnable->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
mCtrlShaderEnable->setCallbackUserData(this);
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
@@ -287,50 +275,42 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
mCtrlDrawDistance = getChild<LLSliderCtrl>("DrawDistance");
|
mCtrlDrawDistance = getChild<LLSliderCtrl>("DrawDistance");
|
||||||
mDrawDistanceMeterText1 = getChild<LLTextBox>("DrawDistanceMeterText1");
|
mDrawDistanceMeterText1 = getChild<LLTextBox>("DrawDistanceMeterText1");
|
||||||
mDrawDistanceMeterText2 = getChild<LLTextBox>("DrawDistanceMeterText2");
|
mDrawDistanceMeterText2 = getChild<LLTextBox>("DrawDistanceMeterText2");
|
||||||
mCtrlDrawDistance->setCommitCallback(&LLPanelDisplay::updateMeterText);
|
mCtrlDrawDistance->setCommitCallback(boost::bind(&LLPanelDisplay::updateMeterText, this));
|
||||||
mCtrlDrawDistance->setCallbackUserData(this);
|
|
||||||
|
|
||||||
// Object detail slider
|
// Object detail slider
|
||||||
mCtrlLODFactor = getChild<LLSliderCtrl>("ObjectMeshDetail");
|
mCtrlLODFactor = getChild<LLSliderCtrl>("ObjectMeshDetail");
|
||||||
mLODFactorText = getChild<LLTextBox>("ObjectMeshDetailText");
|
mLODFactorText = getChild<LLTextBox>("ObjectMeshDetailText");
|
||||||
mCtrlLODFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlLODFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1,mLODFactorText));
|
||||||
mCtrlLODFactor->setCallbackUserData(mLODFactorText);
|
|
||||||
|
|
||||||
// Flex object detail slider
|
// Flex object detail slider
|
||||||
mCtrlFlexFactor = getChild<LLSliderCtrl>("FlexibleMeshDetail");
|
mCtrlFlexFactor = getChild<LLSliderCtrl>("FlexibleMeshDetail");
|
||||||
mFlexFactorText = getChild<LLTextBox>("FlexibleMeshDetailText");
|
mFlexFactorText = getChild<LLTextBox>("FlexibleMeshDetailText");
|
||||||
mCtrlFlexFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlFlexFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText,_1, mFlexFactorText));
|
||||||
mCtrlFlexFactor->setCallbackUserData(mFlexFactorText);
|
|
||||||
|
|
||||||
// Tree detail slider
|
// Tree detail slider
|
||||||
mCtrlTreeFactor = getChild<LLSliderCtrl>("TreeMeshDetail");
|
mCtrlTreeFactor = getChild<LLSliderCtrl>("TreeMeshDetail");
|
||||||
mTreeFactorText = getChild<LLTextBox>("TreeMeshDetailText");
|
mTreeFactorText = getChild<LLTextBox>("TreeMeshDetailText");
|
||||||
mCtrlTreeFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlTreeFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mTreeFactorText));
|
||||||
mCtrlTreeFactor->setCallbackUserData(mTreeFactorText);
|
|
||||||
|
|
||||||
// Avatar detail slider
|
// Avatar detail slider
|
||||||
mCtrlAvatarFactor = getChild<LLSliderCtrl>("AvatarMeshDetail");
|
mCtrlAvatarFactor = getChild<LLSliderCtrl>("AvatarMeshDetail");
|
||||||
mAvatarFactorText = getChild<LLTextBox>("AvatarMeshDetailText");
|
mAvatarFactorText = getChild<LLTextBox>("AvatarMeshDetailText");
|
||||||
mCtrlAvatarFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlAvatarFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mAvatarFactorText));
|
||||||
mCtrlAvatarFactor->setCallbackUserData(mAvatarFactorText);
|
|
||||||
|
|
||||||
// Avatar physics detail slider
|
// Avatar physics detail slider
|
||||||
mCtrlAvatarPhysicsFactor = getChild<LLSliderCtrl>("AvatarPhysicsDetail");
|
mCtrlAvatarPhysicsFactor = getChild<LLSliderCtrl>("AvatarPhysicsDetail");
|
||||||
mAvatarPhysicsFactorText = getChild<LLTextBox>("AvatarPhysicsDetailText");
|
mAvatarPhysicsFactorText = getChild<LLTextBox>("AvatarPhysicsDetailText");
|
||||||
mCtrlAvatarPhysicsFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlAvatarPhysicsFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mAvatarPhysicsFactorText));
|
||||||
mCtrlAvatarPhysicsFactor->setCallbackUserData(mAvatarPhysicsFactorText);
|
|
||||||
|
|
||||||
// Terrain detail slider
|
// Terrain detail slider
|
||||||
mCtrlTerrainFactor = getChild<LLSliderCtrl>("TerrainMeshDetail");
|
mCtrlTerrainFactor = getChild<LLSliderCtrl>("TerrainMeshDetail");
|
||||||
mTerrainFactorText = getChild<LLTextBox>("TerrainMeshDetailText");
|
mTerrainFactorText = getChild<LLTextBox>("TerrainMeshDetailText");
|
||||||
mCtrlTerrainFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlTerrainFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mTerrainFactorText));
|
||||||
mCtrlTerrainFactor->setCallbackUserData(mTerrainFactorText);
|
|
||||||
|
|
||||||
// Terrain detail slider
|
// Terrain detail slider
|
||||||
mCtrlSkyFactor = getChild<LLSliderCtrl>("SkyMeshDetail");
|
mCtrlSkyFactor = getChild<LLSliderCtrl>("SkyMeshDetail");
|
||||||
mSkyFactorText = getChild<LLTextBox>("SkyMeshDetailText");
|
mSkyFactorText = getChild<LLTextBox>("SkyMeshDetailText");
|
||||||
mCtrlSkyFactor->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlSkyFactor->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mSkyFactorText));
|
||||||
mCtrlSkyFactor->setCallbackUserData(mSkyFactorText);
|
|
||||||
|
|
||||||
// Particle detail slider
|
// Particle detail slider
|
||||||
mCtrlMaxParticle = getChild<LLSliderCtrl>("MaxParticleCount");
|
mCtrlMaxParticle = getChild<LLSliderCtrl>("MaxParticleCount");
|
||||||
@@ -338,8 +318,7 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
// Glow detail slider
|
// Glow detail slider
|
||||||
mCtrlPostProcess = getChild<LLSliderCtrl>("RenderPostProcess");
|
mCtrlPostProcess = getChild<LLSliderCtrl>("RenderPostProcess");
|
||||||
mPostProcessText = getChild<LLTextBox>("PostProcessText");
|
mPostProcessText = getChild<LLTextBox>("PostProcessText");
|
||||||
mCtrlPostProcess->setCommitCallback(&LLPanelDisplay::updateSliderText);
|
mCtrlPostProcess->setCommitCallback(boost::bind(&LLPanelDisplay::updateSliderText, _1, mPostProcessText));
|
||||||
mCtrlPostProcess->setCallbackUserData(mPostProcessText);
|
|
||||||
|
|
||||||
// Text boxes (for enabling/disabling)
|
// Text boxes (for enabling/disabling)
|
||||||
mShaderText = getChild<LLTextBox>("ShadersText");
|
mShaderText = getChild<LLTextBox>("ShadersText");
|
||||||
@@ -351,7 +330,11 @@ BOOL LLPanelDisplay::postBuild()
|
|||||||
mTerrainScaleText = getChild<LLTextBox>("TerrainScaleText");
|
mTerrainScaleText = getChild<LLTextBox>("TerrainScaleText");
|
||||||
|
|
||||||
// Hardware tab
|
// Hardware tab
|
||||||
childSetCommitCallback("vbo", &LLPanelDisplay::onRenderVBOEnable, this);
|
mVBO = getChild<LLCheckBoxCtrl>("vbo");
|
||||||
|
mVBO->setCommitCallback(boost::bind(&LLPanelDisplay::onVertexShaderEnable));
|
||||||
|
|
||||||
|
mVBOStream = getChild<LLCheckBoxCtrl>("vbo_stream");
|
||||||
|
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
@@ -598,13 +581,13 @@ void LLPanelDisplay::refreshEnabledState()
|
|||||||
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
|
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
|
||||||
!gGLManager.mHasVertexBufferObject)
|
!gGLManager.mHasVertexBufferObject)
|
||||||
{
|
{
|
||||||
childSetEnabled("vbo", false);
|
mVBO->setEnabled(false);
|
||||||
//Streaming VBOs -Shyotl
|
//Streaming VBOs -Shyotl
|
||||||
childSetEnabled("vbo_stream", false);
|
mVBOStream->setEnabled(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
childSetEnabled("vbo_stream", LLVertexBuffer::sEnableVBOs);
|
mVBOStream->setEnabled(gSavedSettings.getBOOL("RenderVBOEnable"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no windlight shaders, enable gamma, and fog distance
|
// if no windlight shaders, enable gamma, and fog distance
|
||||||
@@ -811,7 +794,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
|
|||||||
// hide one meter text if we're making things visible
|
// hide one meter text if we're making things visible
|
||||||
if(!isHidden)
|
if(!isHidden)
|
||||||
{
|
{
|
||||||
updateMeterText(mCtrlDrawDistance, this);
|
updateMeterText();
|
||||||
}
|
}
|
||||||
|
|
||||||
mMeshDetailText->setVisible(!isHidden);
|
mMeshDetailText->setVisible(!isHidden);
|
||||||
@@ -900,12 +883,11 @@ void LLPanelDisplay::apply()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data)
|
void LLPanelDisplay::onChangeQuality(LLUICtrl* caller)
|
||||||
{
|
{
|
||||||
LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(ctrl);
|
LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(caller);
|
||||||
LLPanelDisplay* cur_panel = static_cast<LLPanelDisplay*>(data);
|
|
||||||
|
|
||||||
if(sldr == NULL || cur_panel == NULL)
|
if(sldr == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -914,19 +896,14 @@ void LLPanelDisplay::onChangeQuality(LLUICtrl *ctrl, void *data)
|
|||||||
LLFeatureManager::getInstance()->setGraphicsLevel(set, true);
|
LLFeatureManager::getInstance()->setGraphicsLevel(set, true);
|
||||||
|
|
||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
cur_panel->refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::onChangeCustom(LLUICtrl *ctrl, void *data)
|
void LLPanelDisplay::onChangeCustom()
|
||||||
{
|
{
|
||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::onApplyResolution(LLUICtrl* src, void* user_data)
|
|
||||||
{
|
|
||||||
((LLPanelDisplay*) src)->applyResolution();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLPanelDisplay::applyResolution()
|
void LLPanelDisplay::applyResolution()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1018,20 +995,14 @@ void LLPanelDisplay::applyWindowSize()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onCommitWindowedMode()
|
||||||
void LLPanelDisplay::onCommitWindowedMode(LLUICtrl* ctrl, void *data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay *panel = (LLPanelDisplay*)data;
|
refresh();
|
||||||
|
|
||||||
panel->refresh();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onCommitAutoDetectAspect(const LLSD& value)
|
||||||
void LLPanelDisplay::onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay *panel = (LLPanelDisplay*)data;
|
BOOL auto_detect = value.asBoolean();
|
||||||
|
|
||||||
BOOL auto_detect = ((LLCheckBoxCtrl*)ctrl)->get();
|
|
||||||
F32 ratio;
|
F32 ratio;
|
||||||
|
|
||||||
if (auto_detect)
|
if (auto_detect)
|
||||||
@@ -1053,27 +1024,23 @@ void LLPanelDisplay::onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data)
|
|||||||
aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
|
aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->mCtrlAspectRatio->setLabel(aspect);
|
mCtrlAspectRatio->setLabel(aspect);
|
||||||
|
|
||||||
ratio = gViewerWindow->mWindow->getNativeAspectRatio();
|
ratio = gViewerWindow->mWindow->getNativeAspectRatio();
|
||||||
gSavedSettings.setF32("FullScreenAspectRatio", ratio);
|
gSavedSettings.setF32("FullScreenAspectRatio", ratio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data)
|
||||||
void LLPanelDisplay::onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
||||||
|
|
||||||
panel->mCtrlAutoDetectAspect->set(FALSE);
|
panel->mCtrlAutoDetectAspect->set(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onSelectAspectRatio()
|
||||||
void LLPanelDisplay::onSelectAspectRatio(LLUICtrl*, void* user_data)
|
|
||||||
{
|
{
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
mCtrlAutoDetectAspect->set(FALSE);
|
||||||
|
|
||||||
panel->mCtrlAutoDetectAspect->set(FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
@@ -1092,22 +1059,13 @@ void LLPanelDisplay::fractionFromDecimal(F32 decimal_val, S32& numerator, S32& d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
void LLPanelDisplay::onVertexShaderEnable()
|
||||||
void LLPanelDisplay::onVertexShaderEnable(LLUICtrl* self, void* data)
|
|
||||||
{
|
{
|
||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
void LLPanelDisplay::onRenderVBOEnable(LLUICtrl* self, void* data)
|
void LLPanelDisplay::setHardwareDefaults()
|
||||||
{
|
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)data;
|
|
||||||
bool enable = panel->childGetValue("vbo").asBoolean();
|
|
||||||
panel->childSetEnabled("vbo_stream", enable);
|
|
||||||
if(!enable) panel->childSetValue("vbo_stream", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLPanelDisplay::setHardwareDefaults(void* user_data)
|
|
||||||
{
|
{
|
||||||
LLFeatureManager::getInstance()->applyRecommendedSettings();
|
LLFeatureManager::getInstance()->applyRecommendedSettings();
|
||||||
LLControlVariable* controlp = gSavedSettings.getControl("RenderAvatarMaxVisible");
|
LLControlVariable* controlp = gSavedSettings.getControl("RenderAvatarMaxVisible");
|
||||||
@@ -1118,11 +1076,11 @@ void LLPanelDisplay::setHardwareDefaults(void* user_data)
|
|||||||
LLFloaterPreference::refreshEnabledGraphics();
|
LLFloaterPreference::refreshEnabledGraphics();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, void* user_data)
|
//static
|
||||||
|
void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box)
|
||||||
{
|
{
|
||||||
// get our UI widgets
|
// get our UI widgets
|
||||||
LLTextBox* text_box = (LLTextBox*)user_data;
|
LLSliderCtrl* slider = dynamic_cast<LLSliderCtrl*>(ctrl);
|
||||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
|
||||||
if(text_box == NULL || slider == NULL)
|
if(text_box == NULL || slider == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -1160,20 +1118,13 @@ void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, void* user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDisplay::updateMeterText(LLUICtrl* ctrl, void* user_data)
|
void LLPanelDisplay::updateMeterText()
|
||||||
{
|
{
|
||||||
// get our UI widgets
|
|
||||||
LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
|
|
||||||
LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
|
|
||||||
|
|
||||||
LLTextBox* m1 = panel->getChild<LLTextBox>("DrawDistanceMeterText1");
|
|
||||||
LLTextBox* m2 = panel->getChild<LLTextBox>("DrawDistanceMeterText2");
|
|
||||||
|
|
||||||
// toggle the two text boxes based on whether we have 2 or 3 digits
|
// toggle the two text boxes based on whether we have 2 or 3 digits
|
||||||
F32 val = slider->getValueF32();
|
F32 val = mCtrlDrawDistance->getValueF32();
|
||||||
bool two_digits = val < 100;
|
bool two_digits = val < 100;
|
||||||
m1->setVisible(two_digits);
|
mDrawDistanceMeterText1->setVisible(two_digits);
|
||||||
m2->setVisible(!two_digits);
|
mDrawDistanceMeterText2->setVisible(!two_digits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ protected:
|
|||||||
LLTextBox *mShadowDetailText;
|
LLTextBox *mShadowDetailText;
|
||||||
LLTextBox *mTerrainScaleText;
|
LLTextBox *mTerrainScaleText;
|
||||||
|
|
||||||
|
LLCheckBoxCtrl *mVBO;
|
||||||
|
LLCheckBoxCtrl *mVBOStream;
|
||||||
|
|
||||||
BOOL mFSAutoDetectAspect;
|
BOOL mFSAutoDetectAspect;
|
||||||
F32 mAspectRatio;
|
F32 mAspectRatio;
|
||||||
|
|
||||||
@@ -192,31 +195,24 @@ protected:
|
|||||||
S32 mVideoCardMem;
|
S32 mVideoCardMem;
|
||||||
F32 mFogRatio;
|
F32 mFogRatio;
|
||||||
|
|
||||||
static void setGraphicsSettings(LLControlGroup& group);
|
|
||||||
static void createGroup();
|
|
||||||
|
|
||||||
// if the quality radio buttons are changed
|
// if the quality radio buttons are changed
|
||||||
static void onChangeQuality(LLUICtrl *ctrl, void *data);
|
void onChangeQuality(LLUICtrl* caller);
|
||||||
|
|
||||||
// if the custom settings box is clicked
|
// if the custom settings box is clicked
|
||||||
static void onChangeCustom(LLUICtrl *ctrl, void *data);
|
static void onChangeCustom();
|
||||||
|
|
||||||
static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data);
|
void onCommitAutoDetectAspect(const LLSD& value);
|
||||||
static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data);
|
static void onKeystrokeAspectRatio(LLLineEditor* caller, void *user_data);
|
||||||
static void onSelectAspectRatio(LLUICtrl*, void*);
|
void onSelectAspectRatio();
|
||||||
static void onCommitWindowedMode(LLUICtrl* ctrl, void *data);
|
void onCommitWindowedMode();
|
||||||
static void onApplyResolution(LLUICtrl* ctrl, void* data);
|
static void updateSliderText(LLUICtrl* ctrl, LLTextBox* text_box);
|
||||||
static void updateSliderText(LLUICtrl* ctrl, void* user_data);
|
void updateMeterText();
|
||||||
static void updateMeterText(LLUICtrl* ctrl, void* user_data);
|
|
||||||
|
|
||||||
/// callback for defaults
|
/// callback for defaults
|
||||||
static void setHardwareDefaults(void *data);
|
static void setHardwareDefaults();
|
||||||
|
|
||||||
// callback for when client turns on shaders
|
// callback for when client turns on shaders
|
||||||
static void onVertexShaderEnable(LLUICtrl*, void*);
|
static void onVertexShaderEnable();
|
||||||
|
|
||||||
// callbacks for hardware tab
|
|
||||||
static void onRenderVBOEnable(LLUICtrl*, void*);
|
|
||||||
|
|
||||||
// helper function
|
// helper function
|
||||||
static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
|
static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
|
||||||
|
|||||||
Reference in New Issue
Block a user