Hello, Been looking through some OpenGL tutorials and I’ve hit a problem with the most basic of things and i have No idea what the problem is…
the code is
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
void main(int *argc, char **argv)
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
glutCreateWindow("Glut Window Test");
and my Error is
Change the following lines
void main(int argc, char **argv)
argc is the total number of command line args passed into ur program its not an int pointer just an int variable.
you pass this argc int variable as a pointer to glutInit.
Hope this helps,
Try sending the address of argc to glutInit so:
Thank you, and I’ll like to say
the tutorial is Doing it wrong.
Which tutorial? Let’s ping the author so they can get it fixed.
Best I can tell, that tutorial isn’t on the opengl.org web site: search link