///////////////////////////////////////////////////////
| 199 | { |
| 200 | //////////////////////////////////////////////////////////// |
| 201 | void RenderTarget::clear(Color color) |
| 202 | { |
| 203 | if (RenderTargetImpl::isActive(m_id) || setActive(true)) |
| 204 | { |
| 205 | // Unbind texture to fix RenderTexture preventing clear |
| 206 | applyTexture(nullptr); |
| 207 | |
| 208 | // Apply the view (scissor testing can affect clearing) |
| 209 | if (!m_cache.enable || m_cache.viewChanged) |
| 210 | applyCurrentView(); |
| 211 | |
| 212 | glCheck(glClearColor(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f)); |
| 213 | glCheck(glClear(GL_COLOR_BUFFER_BIT)); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | |
| 218 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected