aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpaneldisplay.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llpaneldisplay.h
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llpaneldisplay.h')
-rw-r--r--linden/indra/newview/llpaneldisplay.h176
1 files changed, 108 insertions, 68 deletions
diff --git a/linden/indra/newview/llpaneldisplay.h b/linden/indra/newview/llpaneldisplay.h
index 7251ac3..cc39f93 100644
--- a/linden/indra/newview/llpaneldisplay.h
+++ b/linden/indra/newview/llpaneldisplay.h
@@ -34,6 +34,8 @@
34 34
35#include "llpanel.h" 35#include "llpanel.h"
36 36
37#include "llcontrol.h"
38
37class LLSlider; 39class LLSlider;
38class LLSpinCtrl; 40class LLSpinCtrl;
39class LLCheckBoxCtrl; 41class LLCheckBoxCtrl;
@@ -41,6 +43,17 @@ class LLRadioGroup;
41class LLComboBox; 43class LLComboBox;
42class LLLineEditor; 44class LLLineEditor;
43class LLSliderCtrl; 45class LLSliderCtrl;
46class LLTextBox;
47class LLTextEditor;
48
49typedef enum
50{
51 GS_LOW_GRAPHICS,
52 GS_MID_GRAPHICS,
53 GS_HIGH_GRAPHICS,
54 GS_ULTRA_GRAPHICS
55
56} EGraphicsSettings;
44 57
45class LLPanelDisplay 58class LLPanelDisplay
46: public LLPanel 59: public LLPanel
@@ -52,104 +65,131 @@ public:
52 virtual ~LLPanelDisplay(); 65 virtual ~LLPanelDisplay();
53 66
54 virtual BOOL postBuild(); 67 virtual BOOL postBuild();
68
55 void refresh(); // Refresh enable/disable 69 void refresh(); // Refresh enable/disable
70 void refreshEnabledState();
71 void disableUnavailableSettings();
72 void setHiddenGraphicsState(bool isHidden);
56 void apply(); // Apply the changed values. 73 void apply(); // Apply the changed values.
57 void applyResolution(); 74 void applyResolution();
58 void cancel(); 75 void cancel();
59 76
60protected: 77protected:
78 // aspect ratio sliders and boxes
61 LLComboBox *mCtrlFullScreen; // Fullscreen resolution 79 LLComboBox *mCtrlFullScreen; // Fullscreen resolution
62 LLCheckBoxCtrl *mCtrlWindowed; // windowed mode 80 LLCheckBoxCtrl *mCtrlWindowed; // windowed mode
63 LLCheckBoxCtrl *mCtrlAutoDetectAspect; // automatically detect aspect ratio 81 LLCheckBoxCtrl *mCtrlAutoDetectAspect; // automatically detect aspect ratio
64 LLComboBox *mCtrlAspectRatio; // user provided aspect ratio 82 LLComboBox *mCtrlAspectRatio; // user provided aspect ratio
65 83
66 BOOL mFSAutoDetectAspect; 84 /// performance radio group
67 F32 mUIScaleFactor; 85 LLSliderCtrl *mCtrlSliderQuality;
68 BOOL mUIAutoScale; 86 LLCheckBoxCtrl *mCtrlCustomSettings;
69 BOOL mFirstPersonAvatarVisible;
70 F32 mRenderFarClip;
71 F32 mAspectRatio;
72 static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data);
73 static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data);
74 static void onSelectAspectRatio(LLUICtrl*, void*);
75 static void onCommitWindowedMode(LLUICtrl* ctrl, void *data);
76 static void onApplyResolution(LLUICtrl* ctrl, void* data);
77
78 // helper function
79 static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
80};
81
82class LLPanelDisplay2 : public LLPanel
83{
84 friend class LLPreferenceCore;
85
86public:
87 LLPanelDisplay2();
88 virtual ~LLPanelDisplay2();
89
90 virtual BOOL postBuild();
91 void refresh(); // Refresh enable/disable
92 void apply(); // Apply the changed values.
93 void cancel();
94 void refreshEnabledState();
95 87
96protected: 88 // performance sliders and boxes
97 LLRadioGroup* mRadioVideoCardMem; 89 LLViewBorder *mGraphicsBorder;
98
99 BOOL mUseVBO;
100 BOOL mUseAniso;
101 F32 mGamma;
102 F32 mBrightness;
103 S32 mVideoCardMem;
104 F32 mFogRatio;
105 S32 mParticleCount;
106 S32 mCompositeLimit;
107 S32 mDebugBeaconLineWidth;
108 BOOL mProbeHardwareOnStartup;
109};
110 90
111class LLPanelDisplay3 : public LLPanel 91 LLSliderCtrl *mCtrlDrawDistance; // the draw distance slider
112{ 92 LLSliderCtrl *mCtrlLODFactor; // LOD for volume objects
113 friend class LLPreferenceCore; 93 LLSliderCtrl *mCtrlFlexFactor; // Timeslice for flexible objects
114 94 LLSliderCtrl *mCtrlTreeFactor; // Control tree cutoff distance
115public: 95 LLSliderCtrl *mCtrlAvatarFactor; // LOD for avatars
116 LLPanelDisplay3(); 96 LLSliderCtrl *mCtrlTerrainFactor; // LOD for terrain
117 virtual ~LLPanelDisplay3(); 97 LLSliderCtrl *mCtrlSkyFactor; // LOD for terrain
98 LLSliderCtrl *mCtrlMaxParticle; // Max Particle
99 LLSliderCtrl *mCtrlPostProcess; // Max Particle
118 100
119 virtual BOOL postBuild();
120 void refresh(); // Refresh enable/disable
121 void apply(); // Apply the changed values.
122 void setDefaults();
123 void cancel();
124 void refreshEnabledState();
125 static void onVertexShaderEnable(LLUICtrl*, void*);
126
127protected:
128 LLCheckBoxCtrl *mCtrlBumpShiny; 101 LLCheckBoxCtrl *mCtrlBumpShiny;
129 LLCheckBoxCtrl *mCtrlRippleWater; 102 LLCheckBoxCtrl *mCtrlReflections;
103 LLCheckBoxCtrl *mCtrlWindLight;
130 LLCheckBoxCtrl *mCtrlAvatarVP; 104 LLCheckBoxCtrl *mCtrlAvatarVP;
131 LLCheckBoxCtrl *mCtrlShaderEnable; 105 LLCheckBoxCtrl *mCtrlShaderEnable;
132 LLRadioGroup *mCtrlAvatarMode; 106 LLCheckBoxCtrl *mCtrlAvatarImpostors;
107 LLCheckBoxCtrl *mCtrlAvatarCloth;
133 LLRadioGroup *mRadioLightingDetail2; 108 LLRadioGroup *mRadioLightingDetail2;
134 109
135 LLRadioGroup *mRadioTerrainDetail; 110 LLRadioGroup *mRadioTerrainDetail;
136 111 LLRadioGroup *mRadioReflectionDetail;
137 LLSlider *mCtrlLODFactor; // LOD for volume objects 112
138 LLSlider *mCtrlFlexFactor; // Timeslice for flexible objects 113 LLTextBox *mAspectRatioLabel1;
139 LLSlider *mCtrlTreeFactor; // Control tree cutoff distance 114 LLTextBox *mDisplayResLabel;
140 LLSlider *mCtrlAvatarFactor; // LOD for avatars 115 LLTextEditor *mFullScreenInfo;
116
117 LLTextBox *mShaderText;
118 LLTextBox *mReflectionText;
119 LLTextBox *mAvatarText;
120 LLTextBox *mTerrainText;
121 LLTextBox *mLightingText;
122 LLTextBox *mDrawDistanceMeterText1;
123 LLTextBox *mDrawDistanceMeterText2;
124
125 LLTextBox *mMeshDetailText;
126 LLTextBox *mLODFactorText;
127 LLTextBox *mFlexFactorText;
128 LLTextBox *mTreeFactorText;
129 LLTextBox *mAvatarFactorText;
130 LLTextBox *mTerrainFactorText;
131 LLTextBox *mSkyFactorText;
132 LLTextBox *mPostProcessText;
133
134 BOOL mFSAutoDetectAspect;
135 F32 mAspectRatio;
136
137 // performance value holders for cancel
138
139 S32 mQualityPerformance;
140 BOOL mCustomSettings;
141 141
142 BOOL mBumpShiny; 142 BOOL mBumpShiny;
143 BOOL mRippleWater;
144 BOOL mAvatarVP;
145 BOOL mShaderEnable; 143 BOOL mShaderEnable;
144 BOOL mWindLight;
145 BOOL mReflections;
146 BOOL mAvatarVP;
147
148 S32 mReflectionDetail;
149
150 BOOL mAvatarImpostors;
151 BOOL mAvatarCloth;
146 S32 mAvatarMode; 152 S32 mAvatarMode;
147 S32 mLightingDetail; 153 S32 mLightingDetail;
148 S32 mTerrainDetail; 154 S32 mTerrainDetail;
155
156 F32 mRenderFarClip;
149 F32 mPrimLOD; 157 F32 mPrimLOD;
150 F32 mFlexLOD; 158 F32 mFlexLOD;
151 F32 mTreeLOD; 159 F32 mTreeLOD;
152 F32 mAvatarLOD; 160 F32 mAvatarLOD;
161 F32 mTerrainLOD;
162 S32 mSkyLOD;
163 S32 mParticleCount;
164 S32 mPostProcess;
165
166 static void setGraphicsSettings(LLControlGroup& group);
167 static void createGroup();
168
169 // if the quality radio buttons are changed
170 static void onChangeQuality(LLUICtrl *ctrl, void *data);
171
172 // if the custom settings box is clicked
173 static void onChangeCustom(LLUICtrl *ctrl, void *data);
174
175 static void onOpenHelp(void *data);
176 static void onOpenHardwareSettings(void *data);
177 static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data);
178 static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data);
179 static void onSelectAspectRatio(LLUICtrl*, void*);
180 static void onCommitWindowedMode(LLUICtrl* ctrl, void *data);
181 static void onApplyResolution(LLUICtrl* ctrl, void* data);
182 static void updateSliderText(LLUICtrl* ctrl, void* user_data);
183 static void updateMeterText(LLUICtrl* ctrl, void* user_data);
184
185 /// callback for defaults
186 static void setHardwareDefaults(void *data);
187
188 // callback for when client turns on shaders
189 static void onVertexShaderEnable(LLUICtrl*, void*);
190
191 // helper function
192 static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
153}; 193};
154 194
155const S32 LL_MAX_VRAM_INDEX = 6; 195const S32 LL_MAX_VRAM_INDEX = 6;