Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CS_CSPLUGINCOMMON_RENDERMANAGER_HDRHELPER_H__
00020 #define __CS_CSPLUGINCOMMON_RENDERMANAGER_HDRHELPER_H__
00021
00026 #include "iutil/objreg.h"
00027 #include "imap/loader.h"
00028
00029 #include "csplugincommon/rendermanager/posteffects.h"
00030
00031 struct iConfigFile;
00032
00033 namespace CS
00034 {
00035 namespace RenderManager
00036 {
00048 class CS_CRYSTALSPACE_EXPORT HDRHelper
00049 {
00050 public:
00052 enum Quality
00053 {
00059 qualInt8,
00064 qualInt10,
00069 qualInt16,
00075 qualFloat16,
00081 qualFloat32
00082 };
00083
00097 bool Setup (iObjectRegistry* objectReg,
00098 Quality quality, int colorRange);
00099
00101 PostEffectManager& GetHDRPostEffects() { return postEffects; }
00102
00104 void SetMappingShader (iShader* shader);
00106 iShader* GetMappingShader ();
00108 iShaderVariableContext* GetMappingShaderVarContext();
00109
00114 PostEffectManager::Layer* GetMeasureLayer() const
00115 { return measureLayer; }
00116
00117 bool IsRangeLimited() const
00118 { return (quality == qualInt8) || (quality == qualInt10)
00119 || (quality == qualInt16); }
00120 private:
00121 Quality quality;
00122 PostEffectManager postEffects;
00123 PostEffectManager::Layer* measureLayer;
00124 PostEffectManager::Layer* mappingLayer;
00125 };
00126
00128 class CS_CRYSTALSPACE_EXPORT HDRSettings
00129 {
00130 iConfigFile* config;
00131 csString prefix;
00132 public:
00137 HDRSettings (iConfigFile* config, const char* prefix);
00138
00140 bool IsEnabled();
00142 HDRHelper::Quality GetQuality();
00144 int GetColorRange();
00145
00147 const char* GetExposureMethod() const;
00148 };
00149
00150 }
00151 }
00152
00153 #endif // __CS_CSPLUGINCOMMON_RENDERMANAGER_HDRHELPER_H__