1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

gl: Avoid calling gl functions without a context even if the object is GL_NONE

- While calling glDestroyXXXX with GL_NONE is a no-op, calling it without a context will crash some drivers.
This commit is contained in:
kd-11 2022-06-19 15:23:16 +03:00 committed by kd-11
parent 98b6783c05
commit 954c60947d

View File

@ -35,16 +35,16 @@ namespace gl
~shader()
{
if (created())
{
remove();
}
remove();
}
void remove()
{
glDeleteShader(m_id);
m_id = GL_NONE;
if (m_id)
{
glDeleteShader(m_id);
m_id = GL_NONE;
}
}
void create(::glsl::program_domain type_, const std::string& src);