Writing OpenGL Programs on CL112D PC’s
I. Creating an OpenGL
program with Visual Studio 6 Professional
Launch Visual C++ 6.0
Professional
Create a new Project
Add a source file to
the project
Code, build and execute
OpenGL programs
II. Creating an OpenGL
program with Visual Studio .NET 2003
Launch Visual Studio
.NET 2003
Create a new Project
Add a source file to
the project
Code, build and execute
OpenGL programs
I. Creating an OpenGL program with Visual Studio 6
Professional
*
Launch Visual C++ 6.0 Professional
- Click
‘Start’, ‘All Programs’, ‘Microsoft Visual Studio 6.0’, ‘Microsoft Visual
C++ 6.0’

*
Create a new Project
- Once
Visual C++ is open, select ‘New’ from the ‘File’ menu.
- Select
‘Win32 Console Application’ from the ‘Projects’ tab in the ‘New’ window
- Give
the project a name and save the project to a location on your Z: drive

- Click
‘OK’, then ‘Finish’ to create an empty project
*
Add a source file to the project
- Select
‘Project’, ‘Add To Project’, ‘New’

- Select
‘C++ Source File’ from the ‘Files’ tab in the ‘New’ window
- Give
the new source file a name and click ‘OK’ to create the blank source file

*
Code, build and execute OpenGL programs
- Write
your code in the new source file and save the file
- To
build the project, select ‘Build’, then ‘Build filename.exe’, where
filename is the name of the source file you just created.

[The shortcut key to build a program is ‘F7’]
- If
there are no errors, an executable is created. Click ‘Build’, then ‘Execute
filename.exe’, again where filename is the name of the source you just
created.

[The shortcut key to execute a program is ‘Ctrl+F5’]
- From
here, you can continue to edit the source file, compile and execute!
II. Creating an OpenGL program with Visual Studio .NET
2003
[*** Files must be saved on the local disk (C:) to execute properly!
You will need to copy all files to your Z: drive when finished!]
*
Launch Visual Studio .NET 2003
- Click ‘Start’,
‘All Programs’, ‘Microsoft Visual Studio .NET 2003’, ‘Microsoft Visual
.NET 2003’

*
Create a new Project
- Once
the Microsoft Development Environment is open, select ‘File’, ‘New’, then
‘Project’

- Select
‘Visual C++ Projects’ from the ‘Project Types’, then ‘Empty Project
(.NET)’ from ‘Templates’ in the ‘New Project’ window
- Give
the project a name and save the project to a location on the C: drive

- Click
‘OK’ to create an empty project
*
Add a source file to the project
- Select
‘Project’, ‘Add New Item’
- In
the ‘Templates’ section of the ‘Add New Item’ window, select ‘C++ File (.cpp)’
- Give
the new source file a name and click ‘Open’ to create the blank source
file

*
Code, build and execute OpenGL programs
- Write
your code in the new source file and save the file
- To
build the project, select ‘Build’, then ‘Build filename’, where filename
is the name of the source file you just created.

[The shortcut key to build a program is ‘F7’]
- If there
are no errors, an executable is created.
Click ‘Debug’, then ‘Start Without Debugging’.

[The shortcut key to execute a program is ‘Ctrl+F5’]
- From
here, you can continue to edit the source file, compile and execute!
- *** Be sure to copy your files from C:
on the local PC to your Z: drive when finished! All data on the C: drive will be
periodically erased!!
Questions: crompton@cse.ohio-state.edu