I need to update one of the images in the OpenGL context so I do a: getPixelData()->sendDataChangeMessage();
This in turn calls the CachedImageList::imageDataChanged which in turn calls release on the texture. The problem is that when this happens the context is not active and so does not delete the texture.
void OpenGLTexture::release()
{
if (textureID != 0
&& ownerContext == OpenGLContext::getCurrentContext())
{
glDeleteTextures (1, &textureID);
textureID = 0;
width = 0;
height = 0;
}
}
What is the best way to go about sending the changed flag as it is always on the main message thread and the context is not active at the time?
