Java Solaris Communities About Sun How to Buy United States Worldwide

GLUT Toolkit

Download

Table of Contents
 
 

In order to run GLUT programs, you will need to install GLUT software as prescribed in the Installation Instructions below.

 
 
 

Installation Instructions

 
  • Download precompiled GLUT binaries for Solaris Operating Environment, SPARC Platform Edition (16.5 MB). Save the GLUT download file to a local directory, then unzip and untar the downloaded file.

    % gunzip -c glut*.tar.gz | tar xvpf -
  • Download image datafile distribution (3.8 MB) into the 'sparc_solaris' subdirectory, then unzip and untar in the downloaded file.

    % cd sparc_solaris
    % gunzip -c glut_data-3.7.tar.gz | tar xvpf -
  • Optionally remove the glut*.tar.gz file to save space
 
 
 

Running GLUT Examples

 
  • The pre-compiled GLUT example programs are located in the 'progs' subdirectory. You can run the demos by simply entering the name of the program. For example:

    % cd sparc_solaris/glut-3.7/progs
    % ./demos/atlantis/atlantis
 
Rebuilding the GLUT Examples  
  • To rebuild the examples, go to the subdirectory which contains the program and enter make depend, and then enter make. For example:

    % cd sparc_solaris/glut-3.7/progs/demos/atlantis
    % make depend
    % make
 
Building GLUT library and GLUT applications on Solaris software  
 
  • To compile an GLUT example using gcc, the makefiles being used have to be modified. Replace cc references with gcc and remove compile flags -xF, -Wa and -cg92. Example output compiling demo opengl_logo:

    % cd sparc_solaris/glut-3.7/progs/demos/opengl_logo
    % rm *.o; make
    gcc -O -DSYSV -DSVR4 -I../../.././include -I/include -I/include -I/include -DSVR4 -DSYSV -c opengl_logo.c
    gcc -O -DSYSV -DSVR4 -I../../.././include -I/include -I/include -I/include -DSVR4 -DSYSV -c def_logo.c
    rm -f opengl_logo
    gcc -o opengl_logo opengl_logo.o def_logo.o -O -DSYSV -DSVR4 -R:/usr/openwin/lib -L/lib ../../.././lib/glut/libglut.a -L/lib -lGLU -L/lib -lGL -L -ldga -lXmu -z nodefs -lXi -lXext -lX11 -lm -lsocket -lnsl



    opengl_logo demo makefile diffs:

    % diff Makefile makefile
    55c55
    < CC = cc
    ---
    > CC = gcc
    106,107c106,107
    < CDEBUGFLAGS = -O -xF
    < CCOPTIONS = -DSYSV -DSVR4 -xF -Wa,-cg92
    ---
    > CDEBUGFLAGS = -O
    > CCOPTIONS = -DSYSV -DSVR4

 
Notes  

The skyfly demo has not been ported to the 64-bit Solaris platform.

 
 
Contact About Sun News & Events Employment Site Map Privacy Terms of Use Trademarks Copyright Sun Microsystems, Inc.