Fixed memory leak caused by glutMainLoop() not returning.
Fixed memory leak by allowing glutMainLoop() to return to allow for the scene and streams to be released.pull/3036/head
parent
673a1dcea5
commit
c620e9a2ac
|
@ -15,9 +15,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <glut.h>
|
#include <freeglut.h>
|
||||||
#else
|
#else
|
||||||
#include <GL/glut.h>
|
#include <GL/freeglut.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* assimp include files. These three are usually needed. */
|
/* assimp include files. These three are usually needed. */
|
||||||
|
@ -392,6 +392,7 @@ int main(int argc, char **argv)
|
||||||
glutInitWindowPosition(100,100);
|
glutInitWindowPosition(100,100);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
glutInit(&argc, argv);
|
glutInit(&argc, argv);
|
||||||
|
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
|
||||||
|
|
||||||
glutCreateWindow("Assimp - Very simple OpenGL sample");
|
glutCreateWindow("Assimp - Very simple OpenGL sample");
|
||||||
glutDisplayFunc(display);
|
glutDisplayFunc(display);
|
||||||
|
|
Loading…
Reference in New Issue