///////////////////////////////////////////////////////
| 901 | |
| 902 | //////////////////////////////////////////////////////////// |
| 903 | void RenderTarget::cleanupDraw(const RenderStates& states) |
| 904 | { |
| 905 | // Unbind the shader, if any |
| 906 | if (states.shader) |
| 907 | applyShader(nullptr); |
| 908 | |
| 909 | // If the texture we used to draw belonged to a RenderTexture, then forcibly unbind that texture. |
| 910 | // This prevents a bug where some drivers do not clear RenderTextures properly. |
| 911 | if (states.texture && states.texture->m_fboAttachment) |
| 912 | applyTexture(nullptr); |
| 913 | |
| 914 | // Mask the color buffer back on if necessary |
| 915 | if (states.stencilMode.stencilOnly) |
| 916 | glCheck(glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE)); |
| 917 | |
| 918 | // Re-enable the cache at the end of the draw if it was disabled |
| 919 | m_cache.enable = true; |
| 920 | } |
| 921 | |
| 922 | } // namespace sf |
| 923 |
nothing calls this directly
no outgoing calls
no test coverage detected