diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llrender/llpostprocess.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llrender/llpostprocess.cpp (renamed from linden/indra/newview/llpostprocess.cpp) | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/linden/indra/newview/llpostprocess.cpp b/linden/indra/llrender/llpostprocess.cpp index 7ee7100..c884951 100644 --- a/linden/indra/newview/llpostprocess.cpp +++ b/linden/indra/llrender/llpostprocess.cpp | |||
@@ -29,9 +29,8 @@ | |||
29 | * $/LicenseInfo$ | 29 | * $/LicenseInfo$ |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "llviewerprecompiledheaders.h" | 32 | #include "linden_common.h" |
33 | 33 | ||
34 | #include "pipeline.h" | ||
35 | #include "llpostprocess.h" | 34 | #include "llpostprocess.h" |
36 | #include "llglslshader.h" | 35 | #include "llglslshader.h" |
37 | #include "llsdserialize.h" | 36 | #include "llsdserialize.h" |
@@ -58,10 +57,11 @@ LLPostProcess::LLPostProcess(void) : | |||
58 | mAllEffects(LLSD::emptyMap()), | 57 | mAllEffects(LLSD::emptyMap()), |
59 | screenW(1), screenH(1) | 58 | screenW(1), screenH(1) |
60 | { | 59 | { |
61 | LLString pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); | 60 | /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender. |
61 | std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); | ||
62 | LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL; | 62 | LL_DEBUGS2("AppInit", "Shaders") << "Loading PostProcess Effects settings from " << pathName << LL_ENDL; |
63 | 63 | ||
64 | llifstream effectsXML(pathName.c_str()); | 64 | llifstream effectsXML(pathName); |
65 | 65 | ||
66 | if (effectsXML) | 66 | if (effectsXML) |
67 | { | 67 | { |
@@ -105,6 +105,7 @@ LLPostProcess::LLPostProcess(void) : | |||
105 | } | 105 | } |
106 | 106 | ||
107 | setSelectedEffect("default"); | 107 | setSelectedEffect("default"); |
108 | */ | ||
108 | } | 109 | } |
109 | 110 | ||
110 | LLPostProcess::~LLPostProcess(void) | 111 | LLPostProcess::~LLPostProcess(void) |
@@ -143,16 +144,18 @@ void LLPostProcess::setSelectedEffect(std::string const & effectName) | |||
143 | 144 | ||
144 | void LLPostProcess::saveEffect(std::string const & effectName) | 145 | void LLPostProcess::saveEffect(std::string const & effectName) |
145 | { | 146 | { |
147 | /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender. | ||
146 | mAllEffects[effectName] = tweaks; | 148 | mAllEffects[effectName] = tweaks; |
147 | 149 | ||
148 | LLString pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); | 150 | std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", XML_FILENAME)); |
149 | //llinfos << "Saving PostProcess Effects settings to " << pathName << llendl; | 151 | //llinfos << "Saving PostProcess Effects settings to " << pathName << llendl; |
150 | 152 | ||
151 | llofstream effectsXML(pathName.c_str()); | 153 | llofstream effectsXML(pathName); |
152 | 154 | ||
153 | LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); | 155 | LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter(); |
154 | 156 | ||
155 | formatter->format(mAllEffects, effectsXML); | 157 | formatter->format(mAllEffects, effectsXML); |
158 | */ | ||
156 | } | 159 | } |
157 | 160 | ||
158 | void LLPostProcess::apply(unsigned int width, unsigned int height) | 161 | void LLPostProcess::apply(unsigned int width, unsigned int height) |
@@ -213,6 +216,7 @@ void LLPostProcess::applyShaders(void) | |||
213 | 216 | ||
214 | void LLPostProcess::applyColorFilterShader(void) | 217 | void LLPostProcess::applyColorFilterShader(void) |
215 | { | 218 | { |
219 | /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender. | ||
216 | gPostColorFilterProgram.bind(); | 220 | gPostColorFilterProgram.bind(); |
217 | 221 | ||
218 | gGL.getTexUnit(0)->activate(); | 222 | gGL.getTexUnit(0)->activate(); |
@@ -240,6 +244,7 @@ void LLPostProcess::applyColorFilterShader(void) | |||
240 | /// Draw a screen space quad | 244 | /// Draw a screen space quad |
241 | drawOrthoQuad(screenW, screenH, QUAD_NORMAL); | 245 | drawOrthoQuad(screenW, screenH, QUAD_NORMAL); |
242 | gPostColorFilterProgram.unbind(); | 246 | gPostColorFilterProgram.unbind(); |
247 | */ | ||
243 | } | 248 | } |
244 | 249 | ||
245 | void LLPostProcess::createColorFilterShader(void) | 250 | void LLPostProcess::createColorFilterShader(void) |
@@ -255,6 +260,7 @@ void LLPostProcess::createColorFilterShader(void) | |||
255 | 260 | ||
256 | void LLPostProcess::applyNightVisionShader(void) | 261 | void LLPostProcess::applyNightVisionShader(void) |
257 | { | 262 | { |
263 | /* Do nothing. Needs to be updated to use our current shader system, and to work with the move into llrender. | ||
258 | gPostNightVisionProgram.bind(); | 264 | gPostNightVisionProgram.bind(); |
259 | 265 | ||
260 | gGL.getTexUnit(0)->activate(); | 266 | gGL.getTexUnit(0)->activate(); |
@@ -287,6 +293,7 @@ void LLPostProcess::applyNightVisionShader(void) | |||
287 | drawOrthoQuad(screenW, screenH, QUAD_NOISE); | 293 | drawOrthoQuad(screenW, screenH, QUAD_NOISE); |
288 | gPostNightVisionProgram.unbind(); | 294 | gPostNightVisionProgram.unbind(); |
289 | gGL.getTexUnit(0)->activate(); | 295 | gGL.getTexUnit(0)->activate(); |
296 | */ | ||
290 | } | 297 | } |
291 | 298 | ||
292 | void LLPostProcess::createNightVisionShader(void) | 299 | void LLPostProcess::createNightVisionShader(void) |