| 623 | } |
| 624 | |
| 625 | void OpenGlRenderer::startFrame() { |
| 626 | if (m_scissorRect) |
| 627 | glDisable(GL_SCISSOR_TEST); |
| 628 | |
| 629 | for (auto& frameBuffer : m_frameBuffers) { |
| 630 | glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBuffer.second->id); |
| 631 | glClear(GL_COLOR_BUFFER_BIT); |
| 632 | frameBuffer.second->blitted = false; |
| 633 | } |
| 634 | |
| 635 | glBindFramebuffer(GL_FRAMEBUFFER, 0); |
| 636 | |
| 637 | glClear(GL_COLOR_BUFFER_BIT); |
| 638 | |
| 639 | if (m_scissorRect) |
| 640 | glEnable(GL_SCISSOR_TEST); |
| 641 | } |
| 642 | |
| 643 | void OpenGlRenderer::finishFrame() { |
| 644 | flushImmediatePrimitives(); |