Browse Source

Fix for OpenGL demo.

tags/2021-05-28
jules 13 years ago
parent
commit
ea0260cfc7
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      extras/JuceDemo/Source/demos/OpenGLDemo.cpp

+ 13
- 0
extras/JuceDemo/Source/demos/OpenGLDemo.cpp View File

@@ -62,6 +62,11 @@ public:
startTimer (1000 / 30);
}
~DemoOpenGLCanvas()
{
stopRenderThread();
}
// when the component creates a new internal context, this is called, and
// we'll use the opportunity to create some images to use as textures.
void newOpenGLContextCreated()
@@ -70,6 +75,14 @@ public:
dynamicTextureImage = Image (Image::ARGB, 128, 128, true, OpenGLImageType());
}
void releaseOpenGLContext()
{
// We have to make sure we release any openGL images before the
// GL context gets closed..
logoImage = Image::null;
dynamicTextureImage = Image::null;
}
void mouseDown (const MouseEvent& e)
{
draggableOrientation.mouseDown (e.getPosition());


Loading…
Cancel
Save