void FrameBufferObjectSurface::AttachTexture(Texture& texture, GLenum attachment, int mipmapLevel)
{
    SafeBind();
    glFramebufferTexture2D( GL_FRAMEBUFFER, attachment,
                           texture.getTargetType(), texture.getTextureID(), mipmapLevel );
    SafeUnbind();
}
Example #2
0
void Shader::PrepareUniform(string name) 
{
	SafeBind();
	if (uniforms.Find(name) == -1)
	{
		uniforms.Add(name);
	}

	GetUniformLocation(name);
	SafeUnbind();
}
Example #3
0
void Asset::UnbindIfNeeded() 
{
	if (isBound)
		SafeUnbind();
}
Example #4
0
void Asset::UnbindIfNeeded(bool check) 
{
	if (check)
		SafeUnbind();
}