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?
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