fix opengl context checks
This commit is contained in:
@@ -121,7 +121,20 @@ namespace OpenGL
|
||||
{
|
||||
if (_handle)
|
||||
{
|
||||
gl.deleteProgram (*_handle);
|
||||
if (QOpenGLContext::currentContext() && ::gl.getCurrentContext() != nullptr)
|
||||
{
|
||||
gl.deleteProgram(*_handle);
|
||||
}
|
||||
/*else
|
||||
{
|
||||
GLuint id = *_handle;
|
||||
|
||||
gl.scheduleCleanup([id]()
|
||||
{
|
||||
gl.deleteProgram(id);
|
||||
}
|
||||
);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user