| |||||||||||
|
Main Menu Other |
Tutorials -- Basic OpenGL Application | ||||||||||
|
How to make a Simple OpenGL ApplicationReady 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 And there you go! We're officially linked to the OpenGL DLLs. Lets move on to using source code files.
|
|||||||||||