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

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