Think I found the answer, it's the missing glFlush(), right? Radeons flush automaticly and nvidia need the request to flush. :D
Thanks anyway, Best regards, Paulo Matos On Wed, 2003-11-26 at 20:49, Paulo Jorge de Oliveira Cantante de Matos wrote: > Hi all, > > The code included below in a computer running radeon shows up a > projection of a cube, in a computer running nvidia shows up nothing. I'd > please ask you to run it and reply to the list saying if it happens to > you too. If you know why please explain me... I'm really not > understanding why. > > --------------------- Code: compiled with: > -----gcc main.c -o test -lGL -lGLU -lglut > --------------------- > #include <stdio.h> > #include <GL/glut.h> > #include "snapshot.h" > > > void init(void) { > glClearColor(0.0, 0.0, 0.0, 0.0); > > } > > void display(void) { > > glClear(GL_COLOR_BUFFER_BIT); > > glColor3f(1.0,1.0,1.0); > glutWireCube(2.0); > > } > > void keyboard(unsigned char key, int x, int y) { > > > switch(key) { > case 27: > exit(0); > break; > case 's': > case 'S': > break; > default: > break; > } > } > > void reshape(GLsizei w, GLsizei h) { > > //prevent divide by 0 > if(h == 0) h = 1; > > glViewport(0, 0, w, h); > glMatrixMode(GL_PROJECTION); > glLoadIdentity(); > > //Establish clipping volume (left, right, bottom, top, near, far) > gluPerspective(60.0, (GLdouble) w/ (GLdouble) h, 3.0, 6.0); > gluLookAt(0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); > > glMatrixMode(GL_MODELVIEW); > glLoadIdentity(); > } > > int main(int argc, char *argv[]) { > > glutInit(&argc, argv); > glutInitDisplayMode(GLUT_RGB); > glutInitWindowSize(250, 250); > glutInitWindowPosition(100, 100); > glutCreateWindow("EcoSim"); > init(); > glutReshapeFunc(reshape); > glutDisplayFunc(display); > glutKeyboardFunc(keyboard); > glutMainLoop(); > > return 0; > } > > > ---------------------------- > > Best regards, -- Paulo J. Matos : pocm [_at_] mega . ist . utl . pt Instituto Superior Tecnico - Lisbon Computer and Software Eng. - A.I. - > http://mega.ist.utl.pt/~pocm --- -> God had a deadline... So, he wrote it all in Lisp! -- [EMAIL PROTECTED] mailing list