| 957 | } |
| 958 | |
| 959 | void framebuffer::unbindForWriting() { |
| 960 | if (!fbStack.empty()) { |
| 961 | fbStack.pop_back(); |
| 962 | } |
| 963 | if (fbStack.empty()) { |
| 964 | GL_CHECK_ERR(glBindFramebuffer(GL_FRAMEBUFFER, 0)); |
| 965 | GL_CHECK_ERR(glViewport(0, 0, xres, yres)); |
| 966 | } else { |
| 967 | auto fb = fbStack.back(); |
| 968 | fbStack.pop_back(); |
| 969 | fb->bindForWriting(); |
| 970 | } |
| 971 | } |
| 972 | |
| 973 | void framebuffer::unbindForReading() { |
| 974 | GL_CHECK_ERR(glBindFramebuffer(GL_READ_FRAMEBUFFER, 0)); |
no test coverage detected