CrystalSpace

Public API Reference

csplugincommon/rendermanager/hdrhelper.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2008 by Frank Richter
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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   } // namespace RenderManager
00151 } // namespace CS
00152 
00153 #endif // __CS_CSPLUGINCOMMON_RENDERMANAGER_HDRHELPER_H__

Generated for Crystal Space 2.0 by doxygen 1.7.6.1