Jump to content

  • Log In with Google      Sign In   
  • Create Account

NeHe's OpenGL tutorial


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 BradDaBug   Members   -  Reputation: 897

Like
Likes
Like

Posted 17 September 2001 - 02:40 PM

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?

Sponsor:

#2 Drizzt DoUrden   Members   -  Reputation: 100

Like
Likes
Like

Posted 17 September 2001 - 02:46 PM

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

#3 brettporter   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 September 2001 - 11:53 PM

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!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS