diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llpaneldisplay.h | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-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 '')
-rw-r--r-- | linden/indra/newview/llpaneldisplay.h | 176 |
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 | |||
37 | class LLSlider; | 39 | class LLSlider; |
38 | class LLSpinCtrl; | 40 | class LLSpinCtrl; |
39 | class LLCheckBoxCtrl; | 41 | class LLCheckBoxCtrl; |
@@ -41,6 +43,17 @@ class LLRadioGroup; | |||
41 | class LLComboBox; | 43 | class LLComboBox; |
42 | class LLLineEditor; | 44 | class LLLineEditor; |
43 | class LLSliderCtrl; | 45 | class LLSliderCtrl; |
46 | class LLTextBox; | ||
47 | class LLTextEditor; | ||
48 | |||
49 | typedef enum | ||
50 | { | ||
51 | GS_LOW_GRAPHICS, | ||
52 | GS_MID_GRAPHICS, | ||
53 | GS_HIGH_GRAPHICS, | ||
54 | GS_ULTRA_GRAPHICS | ||
55 | |||
56 | } EGraphicsSettings; | ||
44 | 57 | ||
45 | class LLPanelDisplay | 58 | class 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 | ||
60 | protected: | 77 | protected: |
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 | |||
82 | class LLPanelDisplay2 : public LLPanel | ||
83 | { | ||
84 | friend class LLPreferenceCore; | ||
85 | |||
86 | public: | ||
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 | ||
96 | protected: | 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 | ||
111 | class 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 | |
115 | public: | 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 | |||
127 | protected: | ||
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 | ||
155 | const S32 LL_MAX_VRAM_INDEX = 6; | 195 | const S32 LL_MAX_VRAM_INDEX = 6; |