Showing the changes to libraries/render-utils/src/FramebufferCache.cpp (1 of 8 files). Show all
Unified · Split
| @@ -33,7 +33,7 @@ void FramebufferCache::setFrameBufferSize(QSize frameBufferSize) { · 32 unmodified lines | ||
| 33 | 33 | //If the size changed, we need to delete our FBOs |
| 34 | 34 | if (_frameBufferSize != frameBufferSize) { |
| 35 | 35 | _frameBufferSize = frameBufferSize; |
| 36 | − _primaryFramebufferDepthColor.reset(); | |
| 36 | + _primaryFramebuffer.reset(); | |
| 37 | 37 | _primaryDepthTexture.reset(); |
| 38 | 38 | _primaryColorTexture.reset(); |
| 39 | 39 | _deferredFramebuffer.reset(); |
| @@ -49,7 +49,7 @@ void FramebufferCache::setFrameBufferSize(QSize frameBufferSize) { · 9 unmodified lines | ||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | void FramebufferCache::createPrimaryFramebuffer() { |
| 52 | − _primaryFramebufferDepthColor = gpu::FramebufferPointer(gpu::Framebuffer::create()); | |
| 52 | + _primaryFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); | |
| 53 | 53 | _deferredFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 54 | 54 | _deferredFramebufferDepthColor = gpu::FramebufferPointer(gpu::Framebuffer::create()); |
| 55 | 55 | |
| @@ -60,7 +60,7 @@ void FramebufferCache::createPrimaryFramebuffer() { · 4 unmodified lines | ||
| 60 | 60 | auto defaultSampler = gpu::Sampler(gpu::Sampler::FILTER_MIN_MAG_POINT); |
| 61 | 61 | _primaryColorTexture = gpu::TexturePointer(gpu::Texture::create2D(colorFormat, width, height, defaultSampler)); |
| 62 | 62 | |
| 63 | − _primaryFramebufferDepthColor->setRenderBuffer(0, _primaryColorTexture); | |
| 63 | + _primaryFramebuffer->setRenderBuffer(0, _primaryColorTexture); | |
| 64 | 64 | |
| 65 | 65 | _deferredColorTexture = gpu::TexturePointer(gpu::Texture::create2D(colorFormat, width, height, defaultSampler)); |
| 66 | 66 | _deferredNormalTexture = gpu::TexturePointer(gpu::Texture::create2D(colorFormat, width, height, defaultSampler)); |
| @@ -76,7 +76,7 @@ void FramebufferCache::createPrimaryFramebuffer() { · 9 unmodified lines | ||
| 76 | 76 | auto depthFormat = gpu::Element(gpu::SCALAR, gpu::UINT32, gpu::DEPTH_STENCIL); // Depth24_Stencil8 texel format |
| 77 | 77 | _primaryDepthTexture = gpu::TexturePointer(gpu::Texture::create2D(depthFormat, width, height, defaultSampler)); |
| 78 | 78 | |
| 79 | − _primaryFramebufferDepthColor->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); | |
| 79 | + _primaryFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); | |
| 80 | 80 | |
| 81 | 81 | _deferredFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 82 | 82 | |
| @@ -95,11 +95,11 @@ void FramebufferCache::createPrimaryFramebuffer() { · 12 unmodified lines | ||
| 95 | 95 | _lightingFramebuffer->setDepthStencilBuffer(_primaryDepthTexture, depthFormat); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | −gpu::FramebufferPointer FramebufferCache::getPrimaryFramebufferDepthColor() { | |
| 99 | − if (!_primaryFramebufferDepthColor) { | |
| 98 | +gpu::FramebufferPointer FramebufferCache::getPrimaryFramebuffer() { | |
| 99 | + if (!_primaryFramebuffer) { | |
| 100 | 100 | createPrimaryFramebuffer(); |
| 101 | 101 | } |
| 102 | − return _primaryFramebufferDepthColor; | |
| 102 | + return _primaryFramebuffer; | |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | gpu::TexturePointer FramebufferCache::getPrimaryDepthTexture() { |