Opengl in VC++ win32 console application

I  am  doing openGL using C++ in VS2005  with GLUT...When I include glut.h I am getting error messgaes like " Not able to include glut.h / could not find glut.h".
 Do I want to download and Install glut kit, if it is true where I can dowload?
Give me the step by step instructions for me to use GLUT in my c++ program........
Waiting for the reply.......
My c++ code using opengl with Glut
#include <windows.h>            // Header File For Windows
#include<conio.h>
//#include <gl\gl.h>                  // Header File For The OpenGL32 Library
//#include <gl\glu.h>                  // Header File For The GLu32 Library
#include <glut.h>            // Header File For The Glaux Library
void main()
{
      // These are the AUX functions to set up the win dow
glutInitDisplayMode(AUX_SINGLE | AUX_RGBA);
glutInitPosition(100,100,250,250);
glutInitWindow("My first OpenGL Program");
      // These are the OpenGL functions that do something in the window
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
// Stop and wait for a keypress
cprintf("Press any key to close the Window \n");
getch();

}

jsbsudhaAsked:
Who is Participating?
 
primeMover2004Connect With a Mentor Commented:
Here's GLUT:
http://www.xmission.com/~nate/glut.html

Here's the step-by-step instructions for using GLUT (install etc.) with VS 2005:
http://www.cecs.csulb.edu/~pnguyen/Using%20OpenGL%20in%20Visual%20Studio%202005.htm
0
 
jkrCommented:
>>" Not able to include glut.h / could not find glut.h".

Make sure that the path where these files reside is present in your project settings. To set that, right-click on your project in the solution view, go to "Configuration Properties", "C/C++|General" and and add the path to the field "Additional Include Directories"
0
 
jsbsudhaAuthor Commented:
thank you very much....
Can you explain the below  main function  why it takes two arguments...
int main(int argc, char **argv)
{}
0
 
primeMover2004Commented:
int main(int argc, char **argv)
{}

here "argc" is the "argument count"
which is the number of (command line) arguments passed to the main function.
these arguments are passed as strings: char** argv represents this list of strings.

argv is an array of strings and argc tells you, how many strings in this array are.

0
All Courses

From novice to tech pro — start learning today.