PDA

View Full Version : glut installation



jyoti
07-02-2009, 01:53 AM
Hi

I am trying to install glut-3.6 on linux .
I downloaded the package and followed the instructions in linux folder in readme file.But its giving errors and libglut.so.3.6 is not there.Maybe I am quite unclear about the instructions given there.Pls tell me how to do so.Especially I am not clear about which makefile is replaced by which makefile.

ZbuffeR
07-02-2009, 02:47 AM
try using freeglut, it is a maintained direct replacement of the original glut code.

On Debian/Ubuntu, doing it with package management is very simple, something like :
sudo apt-get install freeglut-dev

What linux distribution do you have ?

Dark Photon
07-02-2009, 05:15 AM
I downloaded the package and followed the instructions in linux folder in readme file. But its giving errors and libglut.so.3.6 is not there.
Here's an super simple GLUT prog. Copy this into glut_link.cxx:

#include <stdio.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#include <GL/glut.h>

main( int argc, char *argv[] )
{
glutInit( &amp;argc, argv );
glutInitDisplayMode( GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGB );
glutCreateWindow( "window title" );
GLint count;
glGetIntegerv( GL_MAX_TEXTURE_UNITS, &amp;count );
printf( "MAX_TEXTURE_UNITS = %d\n", count );
}
Now compile and run with:

g++ -o glut_link glut_link.cxx -lglut
./glut_link
And you should see something like this:

MAX_TEXTURE_UNITS = 4
If you don't, tell us what you do see.

Also, give us the output of:
ls -1 /usr/include/GL/glut.h /usr/lib/libglut* /usr/lib64/libglut*, and are you on 32-bit or 64-bit Linux (uname -m will tell you; if it's x86_64, you're 64-bit)?