Ejemplo n.º 1
0
	void Mem2Native::push(spMemoryTexture src, spNativeTexture dest)
	{	
		src->addRef();
		dest->addRef();
		_messages.send(0, src.get(), dest.get());
		//_messages.post(0, src.get(), dest.get());
	}
Ejemplo n.º 2
0
	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();
	}