You Like My Tutorials? Click The Banner To Keep 'Em Coming!

glGameDeveloper(): The Game Developer's Source for OpenGL Coding
Main Menu
Latest News
Archived News
Tutorials
Links
E-Mail Me

Other
Message Board
My Guestbook

Tutorials -- Basic OpenGL Application
 


How to make a Simple OpenGL Application Page 1 of 3
< Previous Jump to Page: 1 | 2 | 3 Next >

How to make a Simple OpenGL Application

Ready to hop in and start making your first game? Well slow down, first we have some initialization to do. Lucky for you, I took all the fun out of deciphering what the heck all this pointless Windows code does. And by "fun", I'm being sarcastic. =]

This tutorial is intended to be extremely reusable and works no matter what type of OpenGL app you're trying to make.

First lets start off by getting your project set up. This means making a "Project" and linking to the right "libraries", which, if you don't know, are what hooks you up with DLL files. Open Visual C++ and click File-New. Then pick "Win32 Application" under the "Projects" tab. Now up in "Project Name" put in a name for this project, it can be whatever you want.

When a wizard box pops up, just hit "Finish" and then hit "Ok". Step one is complete: you have a project. Now to get it linked with libraries. Click "Settings" under the "Project" menu. Open up the Link tab. Now in the "Object/library Files" box, put in this list of .lib files:

opengl32.lib glu32.lib

These are what you'll need for OpenGL. If you plan on using DirectInput or DirectDraw later, you might as well add these libs too. I'll have tutorials on these topics later too.

DirectInput: dinput.lib dxguid.lib
DirectSound: dsound.lib winmm.lib

And there you go! We're officially linked to the OpenGL DLLs. Lets move on to using source code files.

How to make a Simple OpenGL Application Page 1 of 3
< Previous Jump to Page: 1 | 2 | 3 Next >

This site best viewed with MS Internet Explorer 5.0 at 16-bit color and at least 800x600.

All Contents of this site are Copyright 1999, 2000 Joe Zimmerman. No part of this site (code, HTML, etc.) may be reproduced without my permission.

Click Here!