I’ve got a new problem now. Finally I got my first OpenGL rendered white square to work, but now I’m further in the book and more difficulties come to me. I wrote the next piece of code :
glVertex2f(-0.5,-0.5); glColor3f(0.0,0.0,0.0); glVertex2f(-0.5,0.5); glVertex2f(0.5,0.5); glVertex2f(0.5,-0.5); glEnd();
/* void init()
void myreshape(GLsizei w,GLsizei h)
/* ajust clipping box */
if (w <= h)
gluOrtho2D(-2.0, 2.0, -2.0 * (GLfloat) h / (GLfloat) w,2.0 * (GLfloat) h / (GLfloat) w);
gluOrtho2D(-2.0, 2.0, -2.0 * (GLfloat) w / (GLfloat) h,2.0 * (GLfloat) w / (GLfloat) h);
/* ajust viewport */
/* set global size for use by drawing routine */
// ww =w;
int main(int argc, char** argv)
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
finally after a lot of errormessage’s and corrections, I got it to compile, without errormessages anymore. Realy happy with the new binary I just made, started X server, tried to run, But nothing happend, exept for the message : ‘Segmentation fault’
I’m trying to find out what that could mean.
It cant be a big thing if it has happened before to you, so if U know how to solve this problem, please help.