- Timestamp:
- 02/27/08 09:30:29 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/NodeCores/Groups/HDR/OSGHDRStage.cpp
r1039 r1063 319 319 // Scene Target 320 320 321 FrameBufferObject RefPtr pSceneFBO = FrameBufferObject::create();322 RenderBuffer RefPtr pDepthBuffer = RenderBuffer ::create();321 FrameBufferObjectInternalRefPtr pSceneFBO = FrameBufferObject::create(); 322 RenderBufferInternalRefPtr pDepthBuffer = RenderBuffer ::create(); 323 323 324 324 pDepthBuffer->setInternalFormat(GL_DEPTH_COMPONENT24 ); 325 325 326 326 327 TextureObjChunk RefPtr pSceneTex = TextureObjChunk::create();328 TextureEnvChunk RefPtr pSceneTexEnv = TextureEnvChunk::create();329 Image RefPtr pImg = Image ::create();327 TextureObjChunkInternalRefPtr pSceneTex = TextureObjChunk::create(); 328 TextureEnvChunkInternalRefPtr pSceneTexEnv = TextureEnvChunk::create(); 329 ImageInternalRefPtr pImg = Image ::create(); 330 330 331 331 pImg->set(Image::OSG_RGB_PF, … … 349 349 pSceneTexEnv->setEnvMode (GL_REPLACE ); 350 350 351 TextureBuffer RefPtr pSceneTexBuffer = TextureBuffer::create();351 TextureBufferInternalRefPtr pSceneTexBuffer = TextureBuffer::create(); 352 352 353 353 pSceneTexBuffer->setTexture(pSceneTex); … … 369 369 // Shrink Target (w/2, h/2) 370 370 371 FrameBufferObject RefPtr pShrinkFBO = FrameBufferObject::create();372 373 TextureObjChunk RefPtr pShrinkTex = TextureObjChunk::create();374 TextureEnvChunk RefPtr pShrinkTexEnv = TextureEnvChunk::create();375 pImg = Image ::create();371 FrameBufferObjectInternalRefPtr pShrinkFBO = FrameBufferObject::create(); 372 373 TextureObjChunkInternalRefPtr pShrinkTex = TextureObjChunk::create(); 374 TextureEnvChunkInternalRefPtr pShrinkTexEnv = TextureEnvChunk::create(); 375 pImg = Image ::create(); 376 376 377 377 pImg->set(Image::OSG_RGB_PF, … … 395 395 pShrinkTexEnv->setEnvMode (GL_REPLACE ); 396 396 397 TextureBuffer RefPtr pShrinkTexBuffer = TextureBuffer::create();397 TextureBufferInternalRefPtr pShrinkTexBuffer = TextureBuffer::create(); 398 398 399 399 pShrinkTexBuffer->setTexture(pShrinkTex); … … 416 416 417 417 418 FrameBufferObject RefPtr pBlurFBO = FrameBufferObject::create();419 420 TextureObjChunk RefPtr pBlurTex1 = TextureObjChunk ::create();421 TextureEnvChunk RefPtr pBlurTex1Env = TextureEnvChunk ::create();418 FrameBufferObjectInternalRefPtr pBlurFBO = FrameBufferObject::create(); 419 420 TextureObjChunkInternalRefPtr pBlurTex1 = TextureObjChunk ::create(); 421 TextureEnvChunkInternalRefPtr pBlurTex1Env = TextureEnvChunk ::create(); 422 422 423 423 … … 444 444 pBlurTex1Env->setEnvMode (GL_REPLACE ); 445 445 446 TextureBuffer RefPtr pBlurTexBuffer1 = TextureBuffer::create();446 TextureBufferInternalRefPtr pBlurTexBuffer1 = TextureBuffer::create(); 447 447 448 448 pBlurTexBuffer1->setTexture(pBlurTex1); … … 450 450 451 451 452 TextureObjChunk RefPtr pBlurTex2 = TextureObjChunk::create();453 TextureEnvChunk RefPtr pBlurTex2Env = TextureEnvChunk::create();452 TextureObjChunkInternalRefPtr pBlurTex2 = TextureObjChunk::create(); 453 TextureEnvChunkInternalRefPtr pBlurTex2Env = TextureEnvChunk::create(); 454 454 455 455 … … 476 476 pBlurTex2Env->setEnvMode (GL_REPLACE ); 477 477 478 TextureBuffer RefPtr pBlurTexBuffer2 = TextureBuffer::create();478 TextureBufferInternalRefPtr pBlurTexBuffer2 = TextureBuffer::create(); 479 479 480 480 pBlurTexBuffer2->setTexture(pBlurTex2); … … 493 493 494 494 495 MaterialChunk RefPtr pMatChunk = MaterialChunk::create();495 MaterialChunkInternalRefPtr pMatChunk = MaterialChunk::create(); 496 496 497 497 pMatChunk->setLit(false); … … 502 502 // tone map material 503 503 504 ChunkMaterial RefPtr pTonemapMat = ChunkMaterial ::create();504 ChunkMaterialInternalRefPtr pTonemapMat = ChunkMaterial ::create(); 505 505 506 506 pTonemapMat->addChunk(pMatChunk ); … … 510 510 pTonemapMat->addChunk(pBlurTex1Env, 1); 511 511 512 SHLChunk RefPtr pTonemapShader = generateHDRFragmentProgram();512 SHLChunkInternalRefPtr pTonemapShader = generateHDRFragmentProgram(); 513 513 514 514 pTonemapShader->setUniformParameter("sceneTex", 0); … … 528 528 // Shrink material 529 529 530 ChunkMaterial RefPtr pShrinkMat = ChunkMaterial::create();530 ChunkMaterialInternalRefPtr pShrinkMat = ChunkMaterial::create(); 531 531 532 532 pShrinkMat->addChunk(pMatChunk ); … … 536 536 537 537 538 SHLChunk RefPtr pShrinkShader = generate2DShrinkHalfFilterFP();538 SHLChunkInternalRefPtr pShrinkShader = generate2DShrinkHalfFilterFP(); 539 539 540 540 pShrinkShader->setUniformParameter("inputTex", 0); … … 549 549 // Blur material 550 550 551 ChunkMaterial RefPtr pBlurMat = ChunkMaterial::create();551 ChunkMaterialInternalRefPtr pBlurMat = ChunkMaterial::create(); 552 552 553 553 pBlurMat->addChunk(pMatChunk ); … … 566 566 567 567 // generate blur fragment programs 568 SHLChunkRefPtr pHBlurShader = generate1DConvolutionFilterFP(getBlurWidth(), 569 false, 570 true, 571 iPixelWidth / 2, 572 iPixelHeight / 2); 568 SHLChunkInternalRefPtr pHBlurShader = 569 generate1DConvolutionFilterFP(getBlurWidth(), 570 false, 571 true, 572 iPixelWidth / 2, 573 iPixelHeight / 2); 573 574 574 575 … … 582 583 583 584 584 SHLChunkRefPtr pVBlurShader = generate1DConvolutionFilterFP(getBlurWidth(), 585 true, 586 true, 587 iPixelWidth / 2, 588 iPixelHeight / 2); 585 SHLChunkInternalRefPtr pVBlurShader = 586 generate1DConvolutionFilterFP(getBlurWidth(), 587 true, 588 true, 589 iPixelWidth / 2, 590 iPixelHeight / 2); 589 591 590 592 pVBlurShader->setUniformParameter("inputTex", 1); … … 916 918 << ""; 917 919 918 SHLChunk RefPtr returnValue = SHLChunk::create();920 SHLChunkInternalRefPtr returnValue = SHLChunk::create(); 919 921 920 922 returnValue->setFragmentProgram(ost.str());
