void VideoDriverGL::setRenderTarget(spNativeTexture rt) { if (!rt) { glBindFramebuffer(GL_FRAMEBUFFER, 0); return; } NativeTextureGLES *gl = safeCast<NativeTextureGLES*>(rt.get()); glBindFramebuffer(GL_FRAMEBUFFER, gl->getFboID()); }
void VideoDriverGL::setRenderTarget(spNativeTexture rt) { if (!rt) { glBindFramebuffer(GL_FRAMEBUFFER, _prevFBO); CHECKGL(); return; } glGetIntegerv(GL_FRAMEBUFFER_BINDING, &_prevFBO); NativeTextureGLES *gl = safeCast<NativeTextureGLES*>(rt.get()); glBindFramebuffer(GL_FRAMEBUFFER, gl->getFboID()); CHECKGL(); }