diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/llrender/llpostprocess.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llrender/llpostprocess.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/linden/indra/llrender/llpostprocess.cpp b/linden/indra/llrender/llpostprocess.cpp index 92a0854..7f4be6a 100644 --- a/linden/indra/llrender/llpostprocess.cpp +++ b/linden/indra/llrender/llpostprocess.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -207,7 +208,7 @@ void LLPostProcess::applyShaders(void) | |||
207 | /// If any of the above shaders have been called update the frame buffer; | 208 | /// If any of the above shaders have been called update the frame buffer; |
208 | if (tweaks.useColorFilter()) | 209 | if (tweaks.useColorFilter()) |
209 | { | 210 | { |
210 | GLuint tex = mSceneRenderTexture->getTexName() ; | 211 | U32 tex = mSceneRenderTexture->getTexName() ; |
211 | copyFrameBuffer(tex, screenW, screenH); | 212 | copyFrameBuffer(tex, screenW, screenH); |
212 | } | 213 | } |
213 | applyNightVisionShader(); | 214 | applyNightVisionShader(); |
@@ -217,7 +218,7 @@ void LLPostProcess::applyShaders(void) | |||
217 | /// If any of the above shaders have been called update the frame buffer; | 218 | /// If any of the above shaders have been called update the frame buffer; |
218 | if (tweaks.useColorFilter().asBoolean() || tweaks.useNightVisionShader().asBoolean()) | 219 | if (tweaks.useColorFilter().asBoolean() || tweaks.useNightVisionShader().asBoolean()) |
219 | { | 220 | { |
220 | GLuint tex = mSceneRenderTexture->getTexName() ; | 221 | U32 tex = mSceneRenderTexture->getTexName() ; |
221 | copyFrameBuffer(tex, screenW, screenH); | 222 | copyFrameBuffer(tex, screenW, screenH); |
222 | } | 223 | } |
223 | applyBloomShader(); | 224 | applyBloomShader(); |
@@ -359,7 +360,7 @@ void LLPostProcess::doEffects(void) | |||
359 | 360 | ||
360 | /// Copy the screen buffer to the render texture | 361 | /// Copy the screen buffer to the render texture |
361 | { | 362 | { |
362 | GLuint tex = mSceneRenderTexture->getTexName() ; | 363 | U32 tex = mSceneRenderTexture->getTexName() ; |
363 | copyFrameBuffer(tex, screenW, screenH); | 364 | copyFrameBuffer(tex, screenW, screenH); |
364 | } | 365 | } |
365 | 366 | ||
@@ -385,7 +386,7 @@ void LLPostProcess::doEffects(void) | |||
385 | checkError(); | 386 | checkError(); |
386 | } | 387 | } |
387 | 388 | ||
388 | void LLPostProcess::copyFrameBuffer(GLuint & texture, unsigned int width, unsigned int height) | 389 | void LLPostProcess::copyFrameBuffer(U32 & texture, unsigned int width, unsigned int height) |
389 | { | 390 | { |
390 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture); | 391 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture); |
391 | glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, width, height, 0); | 392 | glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, width, height, 0); |
@@ -502,10 +503,8 @@ void LLPostProcess::createTexture(LLPointer<LLImageGL>& texture, unsigned int wi | |||
502 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture->getTexName()); | 503 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture->getTexName()); |
503 | glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 4, width, height, 0, | 504 | glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 4, width, height, 0, |
504 | GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); | 505 | GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); |
505 | glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_MIN_FILTER,GL_LINEAR); | 506 | gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); |
506 | glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_MAG_FILTER,GL_LINEAR); | 507 | gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); |
507 | glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); | ||
508 | glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); | ||
509 | } | 508 | } |
510 | } | 509 | } |
511 | 510 | ||
@@ -522,11 +521,9 @@ void LLPostProcess::createNoiseTexture(LLPointer<LLImageGL>& texture) | |||
522 | if(texture->createGLTexture()) | 521 | if(texture->createGLTexture()) |
523 | { | 522 | { |
524 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, texture->getTexName()); | 523 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, texture->getTexName()); |
525 | glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, NOISE_SIZE, NOISE_SIZE, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, &buffer[0]); | 524 | LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_LUMINANCE, NOISE_SIZE, NOISE_SIZE, GL_LUMINANCE, GL_UNSIGNED_BYTE, &buffer[0]); |
526 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR); | 525 | gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); |
527 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_LINEAR); | 526 | gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_WRAP); |
528 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); | ||
529 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); | ||
530 | } | 527 | } |
531 | } | 528 | } |
532 | 529 | ||