00001 00032 #ifndef LL_LLPANELDISPLAY_H 00033 #define LL_LLPANELDISPLAY_H 00034 00035 #include "llpanel.h" 00036 00037 class LLSlider; 00038 class LLSpinCtrl; 00039 class LLCheckBoxCtrl; 00040 class LLRadioGroup; 00041 class LLComboBox; 00042 class LLLineEditor; 00043 class LLSliderCtrl; 00044 00045 class LLPanelDisplay 00046 : public LLPanel 00047 { 00048 friend class LLPreferenceCore; 00049 00050 public: 00051 LLPanelDisplay(); 00052 virtual ~LLPanelDisplay(); 00053 00054 virtual BOOL postBuild(); 00055 void refresh(); // Refresh enable/disable 00056 void apply(); // Apply the changed values. 00057 void applyResolution(); 00058 void cancel(); 00059 00060 protected: 00061 LLComboBox *mCtrlFullScreen; // Fullscreen resolution 00062 LLCheckBoxCtrl *mCtrlWindowed; // windowed mode 00063 LLCheckBoxCtrl *mCtrlAutoDetectAspect; // automatically detect aspect ratio 00064 LLComboBox *mCtrlAspectRatio; // user provided aspect ratio 00065 00066 BOOL mFSAutoDetectAspect; 00067 F32 mUIScaleFactor; 00068 BOOL mUIAutoScale; 00069 BOOL mFirstPersonAvatarVisible; 00070 F32 mRenderFarClip; 00071 F32 mAspectRatio; 00072 static void onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data); 00073 static void onKeystrokeAspectRatio(LLLineEditor* caller, void* user_data); 00074 static void onSelectAspectRatio(LLUICtrl*, void*); 00075 static void onCommitWindowedMode(LLUICtrl* ctrl, void *data); 00076 static void onApplyResolution(LLUICtrl* ctrl, void* data); 00077 00078 // helper function 00079 static void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator); 00080 }; 00081 00082 class LLPanelDisplay2 : public LLPanel 00083 { 00084 friend class LLPreferenceCore; 00085 00086 public: 00087 LLPanelDisplay2(); 00088 virtual ~LLPanelDisplay2(); 00089 00090 virtual BOOL postBuild(); 00091 void refresh(); // Refresh enable/disable 00092 void apply(); // Apply the changed values. 00093 void cancel(); 00094 void refreshEnabledState(); 00095 00096 protected: 00097 LLRadioGroup* mRadioVideoCardMem; 00098 LLRadioGroup* mCtrlStereoMode; 00099 00100 BOOL mUseVBO; 00101 BOOL mUseAniso; 00102 F32 mGamma; 00103 F32 mBrightness; 00104 S32 mVideoCardMem; 00105 F32 mFogRatio; 00106 S32 mParticleCount; 00107 S32 mCompositeLimit; 00108 S32 mDebugBeaconLineWidth; 00109 S32 mStereoMode; 00110 F32 mStereoFocalDistance; 00111 F32 mStereoEyeSeparation; 00112 00113 BOOL mProbeHardwareOnStartup; 00114 }; 00115 00116 class LLPanelDisplay3 : public LLPanel 00117 { 00118 friend class LLPreferenceCore; 00119 00120 public: 00121 LLPanelDisplay3(); 00122 virtual ~LLPanelDisplay3(); 00123 00124 virtual BOOL postBuild(); 00125 void refresh(); // Refresh enable/disable 00126 void apply(); // Apply the changed values. 00127 void setDefaults(); 00128 void cancel(); 00129 void refreshEnabledState(); 00130 static void onVertexShaderEnable(LLUICtrl*, void*); 00131 00132 protected: 00133 LLCheckBoxCtrl *mCtrlBumpShiny; 00134 LLCheckBoxCtrl *mCtrlRippleWater; 00135 LLCheckBoxCtrl *mCtrlAvatarVP; 00136 LLCheckBoxCtrl *mCtrlShaderEnable; 00137 LLRadioGroup *mCtrlAvatarMode; 00138 LLRadioGroup *mRadioLightingDetail2; 00139 00140 LLRadioGroup *mRadioTerrainDetail; 00141 00142 LLSlider *mCtrlLODFactor; // LOD for volume objects 00143 LLSlider *mCtrlFlexFactor; // Timeslice for flexible objects 00144 LLSlider *mCtrlTreeFactor; // Control tree cutoff distance 00145 LLSlider *mCtrlAvatarFactor; // LOD for avatars 00146 00147 BOOL mBumpShiny; 00148 BOOL mRippleWater; 00149 BOOL mAvatarVP; 00150 BOOL mShaderEnable; 00151 S32 mAvatarMode; 00152 S32 mLightingDetail; 00153 S32 mTerrainDetail; 00154 F32 mPrimLOD; 00155 F32 mFlexLOD; 00156 F32 mTreeLOD; 00157 F32 mAvatarLOD; 00158 }; 00159 00160 const S32 LL_MAX_VRAM_INDEX = 6; 00161 00162 #endif