[Plib-cvs] plib/examples/src/ssg/load_save load.cxx,1.2,1.3 save.cxx,1.4,1.5
Brought to you by:
sjbaker
|
From: Sebastian U. <ud...@us...> - 2002-09-01 06:58:04
|
Update of /cvsroot/plib/plib/examples/src/ssg/load_save
In directory usw-pr-cvs1:/tmp/cvs-serv6971/ssg/load_save
Modified Files:
load.cxx save.cxx
Log Message:
Mac OS-X compatibility; Minor cleanups
Index: load.cxx
===================================================================
RCS file: /cvsroot/plib/plib/examples/src/ssg/load_save/load.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- load.cxx 26 May 2001 00:01:30 -0000 1.2
+++ load.cxx 1 Sep 2002 06:57:59 -0000 1.3
@@ -3,24 +3,33 @@
#include <ctype.h>
#include <string.h>
#ifdef WIN32
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
#include <math.h>
#include <plib/ssg.h>
-#include <GL/glut.h>
-ssgRoot *scene = NULL ;
-ssgTransform *penguin = NULL ;
-ssgTransform *pedestal = NULL ;
+#ifdef FREEGLUT_IS_PRESENT
+# include <GL/freeglut.h>
+#else
+# ifdef __APPLE__
+# include <GLUT/glut.h>
+# else
+# include <GL/glut.h>
+# endif
+#endif
+
+static ssgRoot *scene = NULL ;
+static ssgTransform *penguin = NULL ;
+static ssgTransform *pedestal = NULL ;
/*
Something to make some interesting motion
for both Tux and the camera.
*/
-void update_motion ()
+static void update_motion ()
{
static int frameno = 0 ;
@@ -46,7 +55,7 @@
The GLUT window reshape event
*/
-void reshape ( int w, int h )
+static void reshape ( int w, int h )
{
glViewport ( 0, 0, w, h ) ;
}
@@ -57,7 +66,7 @@
The GLUT keyboard event
*/
-void keyboard ( unsigned char, int, int )
+static void keyboard ( unsigned char, int, int )
{
exit ( 0 ) ;
}
@@ -68,7 +77,7 @@
The GLUT redraw event
*/
-void redraw ()
+static void redraw ()
{
update_motion () ;
@@ -82,7 +91,7 @@
-void init_graphics ()
+static void init_graphics ()
{
int fake_argc = 1 ;
char *fake_argv[3] ;
@@ -137,7 +146,7 @@
Load a simple database
*/
-void load_database ()
+static void load_database ()
{
/*
Set up the path to the data files
Index: save.cxx
===================================================================
RCS file: /cvsroot/plib/plib/examples/src/ssg/load_save/save.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- save.cxx 6 Jul 2002 23:13:14 -0000 1.4
+++ save.cxx 1 Sep 2002 06:57:59 -0000 1.5
@@ -3,26 +3,35 @@
#include <ctype.h>
#include <string.h>
#ifdef WIN32
-#include <windows.h>
+# include <windows.h>
#else
-#include <unistd.h>
+# include <unistd.h>
#endif
#include <math.h>
#include <plib/ssg.h>
-#include <GL/glut.h>
-ssgRoot *scene = NULL ;
-ssgTransform *object = NULL ;
-ssgEntity *obj_obj = NULL ;
+#ifdef FREEGLUT_IS_PRESENT
+# include <GL/freeglut.h>
+#else
+# ifdef __APPLE__
+# include <GLUT/glut.h>
+# else
+# include <GL/glut.h>
+# endif
+#endif
+static ssgRoot *scene = NULL ;
+static ssgTransform *object = NULL ;
+static ssgEntity *obj_obj = NULL ;
-void redraw ()
+
+static void redraw ()
{
return ;
}
-void init_graphics ()
+static void init_graphics ()
{
int fake_argc = 1 ;
char *fake_argv[3] ;
@@ -49,7 +58,7 @@
}
-void load_database ()
+static void load_database ()
{
/*
Set up the path to the data files
@@ -81,7 +90,7 @@
}
-void save_database ()
+static void save_database ()
{
ssgSaveSSG ( "data/tuxedo.ssg", object ) ;
}
|