gl: Avoid issuing glDelete calls with m_id == GL_NONE

Applies GL_NONE macro usage where it makes sense
This commit is contained in:
AniLeo 2020-05-14 13:53:40 +01:00 committed by Ani
parent d4333788e2
commit 3ad12cf5f8
2 changed files with 57 additions and 27 deletions

View file

@ -202,13 +202,16 @@ namespace gl
void fbo::remove()
{
glDeleteFramebuffers(1, &m_id);
m_id = 0;
if (m_id != GL_NONE)
{
glDeleteFramebuffers(1, &m_id);
m_id = GL_NONE;
}
}
bool fbo::created() const
{
return m_id != 0;
return m_id != GL_NONE;
}
bool fbo::check() const