NeHe's OpenGL tutorial

Started by
1 comment, last by BradDaBug 22 years, 7 months ago
I''m trying to learn OpenGL so i can use it in a game I''m working on. I''m using both Direct3D and OpenGL, and the user chooses which API to use. So i need my program to be able to use both. I''ve got my game set up so that theres several different modules, one for sound, one for Windows, one for input, and one for graphics. The trouble is, NeHe''s tutorial has the Windows code and the OpenGL initialization code pretty intertwined, which I don''t like. The ideal thing would be just a call to something like InitOpenGL() from a setup function, like my Direct3D stuff is. Is that intertwining necessary or is it possible to seperate it like Direct3D is?
I like the DARK layout!
Advertisement
You should read: "OpenGL Game Programming" by Kevin Hawkins and Dave Astle, if you are trying to learn OpenGL, then use NeHe''s tutorials. The book teaches yu the basics very well, and very detailed, but the ending seems to be just a briefing. Its still the best and only OpenGL game programming book in the world, so you should have it.

"I''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''Urden
------------------------------Put THAT in your smoke and pipe it
you need to abstract your OpenGL code and DirectX code to a level appropriate to the application. This is obviously easier with C++ but possible in C/whatever procedural language.

A good resource might be UT''s OpenGL driver code (I''m not sure of the link - it used to be on epic''s tech page).

Basically group the functions of GL code, and implement an equivalent for DX. In C++ - use different classes and instantiate the one the user wants, in C use a function table.

Its not easy

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
Community Service Announcement: Read How to ask questions the smart way before posting!
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!

This topic is closed to new replies.

Advertisement