Showing the changes to interface/src/ui/ApplicationOverlay.cpp (1 of 2 files). Show all
Unified · Split
| @@ -85,6 +85,11 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) { · 84 unmodified lines | ||
| 85 | 85 | gpu::Batch batch; |
| 86 | 86 | renderArgs->_batch = &batch; |
| 87 | 87 | |
| 88 | + int width = _overlayFramebuffer->getWidth(); | |
| 89 | + int height = _overlayFramebuffer->getHeight(); | |
| 90 | + | |
| 91 | + batch.setViewportTransform(glm::ivec4(0, 0, width, height)); | |
| 92 | + | |
| 88 | 93 | // 1) bind the framebuffer |
| 89 | 94 | batch.setFramebuffer(_overlayFramebuffer); |
| 90 | 95 | |
| @@ -93,13 +98,7 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) { · 2 unmodified lines | ||
| 93 | 98 | glm::vec4 color { 0.0f, 0.0f, 0.0f, 0.0f }; |
| 94 | 99 | float depth = 1.0f; |
| 95 | 100 | int stencil = 0; |
| 96 | − batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLORS | gpu::Framebuffer::BUFFER_DEPTH, color, depth, stencil); | |
| 97 | − //batch.clearColorFramebuffer(_overlayFramebuffer->getBufferMask(), glm::vec4(0.0f, 0.0f, 0.0f, 0.0f)); | |
| 98 | − | |
| 99 | − int width = _overlayFramebuffer->getWidth(); | |
| 100 | − int height = _overlayFramebuffer->getHeight(); | |
| 101 | − | |
| 102 | − batch.setViewportTransform(glm::ivec4(0, 0, width, height)); | |
| 101 | + batch.clearFramebuffer(gpu::Framebuffer::BUFFER_COLOR0 | gpu::Framebuffer::BUFFER_DEPTH, color, depth, stencil); | |
| 103 | 102 | |
| 104 | 103 | // Now render the overlay components together into a single texture |
| 105 | 104 | renderOverlays(renderArgs); // renders Scripts Overlay and AudioScope |