Added viewer.cleanup_frame() to all examples.

This commit is contained in:
Robert Osfield 2006-08-02 19:55:03 +00:00
parent 0336231321
commit 41a4aa1548
63 changed files with 440 additions and 62 deletions

View File

@ -279,7 +279,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -214,7 +214,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -221,7 +221,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -203,7 +203,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -199,7 +199,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -1478,7 +1478,10 @@ int main( int argc, char **argv )
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects. // run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame(); viewer.cleanup_frame();

View File

@ -171,7 +171,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -577,7 +577,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
// if we are master clean up by telling all slaves that we're going down. // if we are master clean up by telling all slaves that we're going down.

View File

@ -248,7 +248,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -160,7 +160,13 @@ int main(int argc, char *argv[])
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -1374,7 +1374,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -493,7 +493,13 @@ int main(int argc, char** argv)
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -243,7 +243,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -1132,7 +1132,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -375,7 +375,13 @@ int main(int argc, char *argv[])
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -188,7 +188,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -706,7 +706,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -236,7 +236,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -338,7 +338,12 @@ int main( int argc, char **argv )
// wait for all cull and draw threads to complete. // wait for all cull and draw threads to complete.
viewer.sync(); viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync();
return 0; return 0;
} }

View File

@ -442,7 +442,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -442,7 +442,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -371,11 +371,17 @@ int main( int argc, char **argv )
// fire off the cull and draw traversals of the scene. // fire off the cull and draw traversals of the scene.
viewer.frame(); viewer.frame();
// wait for all cull and draw threads to complete before exit.
viewer.sync();
} }
// wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync();
return 0; return 0;
} }

View File

@ -259,7 +259,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -213,7 +213,13 @@ int main( int argc, char **argv )
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -506,7 +506,13 @@ arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationNam
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -162,7 +162,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -484,7 +484,13 @@ int main(int argc, char** argv)
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -133,7 +133,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -130,7 +130,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -369,6 +369,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -299,7 +299,13 @@ int main(int argc, char *argv[])
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -402,7 +402,13 @@ int main(int argc, char **argv)
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -495,7 +495,13 @@ int main(int argc, char **argv)
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -797,7 +797,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -279,7 +279,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -967,7 +967,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -255,7 +255,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -93,6 +93,15 @@ int main(int, char *[])
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync();
return(0); return(0);
} }

View File

@ -187,7 +187,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -477,7 +477,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -354,7 +354,13 @@ int main(int argc, char** argv)
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -409,7 +409,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -175,7 +175,13 @@ int main( int argc, char **argv )
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -144,7 +144,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -285,7 +285,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -108,6 +108,14 @@ int main( int argc, char **argv )
viewer.update(); viewer.update();
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;
} }

View File

@ -846,7 +846,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -232,7 +232,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -154,7 +154,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -183,7 +183,13 @@ int main( int argc, char **argv )
} }
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -410,7 +410,13 @@ int main(int argc, char **argv)
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -187,7 +187,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -672,7 +672,13 @@ int main(int argc, char **argv)
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -329,7 +329,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -538,7 +538,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -369,7 +369,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -554,7 +554,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -218,7 +218,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
} }
else else

View File

@ -740,7 +740,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();

View File

@ -288,8 +288,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete.
viewer.sync();
// wait for all cull and draw threads to complete before exit. // run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
} }

View File

@ -294,7 +294,13 @@ int main(int argc, char** argv)
viewer.frame(); viewer.frame();
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -435,7 +435,13 @@ int main(int argc, char *argv[])
} }
// wait for all cull and draw threads to complete before exit. // wait for all cull and draw threads to complete.
viewer.sync();
// run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
return 0; return 0;

View File

@ -1658,8 +1658,13 @@ int main( int argc, char **argv )
} }
// wait for all cull and draw threads to complete.
viewer.sync();
// wait for all cull and draw threads to complete before exit. // run a clean up frame to delete all OpenGL objects.
viewer.cleanup_frame();
// wait for all the clean up frame to complete.
viewer.sync(); viewer.sync();
} }