コード例 #1
0
	void VideoDriverGL::setRenderTarget(spNativeTexture rt)
	{
		if (!rt)
		{
			glBindFramebuffer(GL_FRAMEBUFFER, 0);
			return;
		}

		NativeTextureGLES *gl = safeCast<NativeTextureGLES*>(rt.get());		
		glBindFramebuffer(GL_FRAMEBUFFER, gl->getFboID());
	}
コード例 #2
0
	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();
	}