Ok after alot of work last night to setup partition and install mandrake i finally have it running but.....
I'm trying to do opengl programming for a class. The problem is they never taught us how to set it all up so we could do it at home. So i have been working on the university computer where everything is nicely setup and we are provided make files and everything. The problem is i need to do a project and need to work on it at home.
So.... i need to know how to install glut/mesa/whatever else i need so i can work on this stuff at home. I need help urgently as i only have about a week left so if anyone out there can explain it to me very very simply what i need to do it would be much apperciated.
P.S. How do you make yourself root outside of the console so you can move files around i.e. into /usr(it won't let me)?
P.P.S. here is a small example of the code stuff i need to run
#include <GL/glut.h>
#include "render.h"
#include "objects.h"
static GLfloat white_colour[] = { 1.0, 1.0, 1.0 };
static GLfloat red_colour[] = { 1.0, 0.0, 0.0 };
static GLfloat filter_colour[] = { 1.0, 0.78, .25};
void Cigarette()
{
glPushMatrix();
setColour(white_colour);
glTranslatef(0,4,0);
glScalef(.5,4,.5);
drawCylinder(20);
glPopMatrix();
glPushMatrix();
setColour(filter_colour);
glTranslatef(0,1,0);
glScalef(.5,2,.5);
drawCylinder(20);
glPopMatrix();
glPushMatrix();
setColour(red_colour);
glTranslatef(0,6.005,0);
glScalef(.5,.01,.5);
drawCylinder(20);
glPopMatrix();
}
void Render()
{
Cigarette();
}
And an example of the make file we were given(no idea what this stuff does so if you could tell me what i need to change here)
TARGET = lab06b
DEBUG = -g
CFLAGS = ${DEBUG}
OBJS = main.o Ball.o BallAux.o BallMath.o render.o objects.o texture.o
# WHERE TO FIND CERTAIN HEADERS AND LIBS
# Linux
DIR_HEADERS = \
-I/usr/local/Mesa-6.1/include
LINK_LIBRARIES = -L /usr/X11R6/lib \
-L/usr/local/Mesa-6.1/lib \
-lglut -lXmu -lGLU -lGL -lX11 -lm
#Linux compile
linux: ${OBJS}
$(CC) -o ${TARGET} $(CFLAGS) $(DIR_HEADERS) ${OBJS} ${LINK_LIBRARIES}
clean:
- rm core render.o main.o ${TARGET}
#SUFFIX RULES: any file with one of these suffixes is significant
.SUFFIXES: .o .c
# SUFFIX RULE: how to turn a .c file into a .o file
.c.o:
$(CC) -c $(CFLAGS) ${DIR_HEADERS} $*.c -o $*.o