- updated

git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@117 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2015-01-05 13:35:46 +00:00
parent 3b38c6a587
commit 6e5aa7a991
156 changed files with 2332 additions and 1370 deletions
@@ -164,14 +164,21 @@ void OpenGLTexture::loadARGBFlipped (const PixelARGB* pixels, int w, int h)
void OpenGLTexture::release()
{
if (textureID != 0
&& ownerContext == OpenGLContext::getCurrentContext())
if (textureID != 0)
{
glDeleteTextures (1, &textureID);
// If the texture is deleted while the owner context is not active, it's
// impossible to delete it, so this will be a leak until the context itself
// is deleted.
jassert (ownerContext == OpenGLContext::getCurrentContext());
textureID = 0;
width = 0;
height = 0;
if (ownerContext == OpenGLContext::getCurrentContext())
{
glDeleteTextures (1, &textureID);
textureID = 0;
width = 0;
height = 0;
}
}
}