1. At first , you need to download the openGL library.
2. look for directory named "GL" in "C:\Program Files\Microsoft Visual Studio\VC98\Include"
(note: go to your installation folder of VS98/6.0)
If not present , then create directory named "GL".
Paste the files of the openGL library to "C:\Program Files\Microsoft Visual Studio\VC98\Include\GL"
3. Browse the folder location "C:\Program Files\Microsoft Visual Studio\VC98\Lib" and paste all .lib files to this directory.
Done configuration .
1. Create a cpp file ,open visual studio->Visual C++ 6.0
2. Name the file "myfirst.cpp"
3. Write the code for opengl.
Sample code for hello world of openGL (myfirst.cpp):
4. Before compiling the code , place "glut32.dll"(found in opengl library zip) file in your project folder, where you have created the "myfirst.cpp" file
5. Build the code, and run it . The Output will be a 2D box in the window.
Done.
No comments:
Post a Comment