Jump to content
  • Advertisement
Sign in to follow this  
Acidburn007

The best way to learn OpenGL?

This topic is 4866 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Actually I've got 2 questions... 1 - I've completed a structured verision of hangman. But it doesn't live up to real life expectations. When a player enters a letter it checks and comes back saying whether it exists or not. After that it clears the screen and redraws the elements. My trouble is here - whilst theres nothing wrong with the code in general I thought its not something you'd do in a real life sistuation - You'd only update / redraw the elements that have changed right? Can anyone point me into a solution? 2nd question - Whats the best and quickist way of learning openGL? I've almost completed my first year in c++ programming and looking for a higher challenge. Cheers

Share this post


Link to post
Share on other sites
Advertisement
Many people (myself included) learned to use the OpenGL API from NeHe's website, but I would advise you to get a book as well as using internet resources. There are a lot of OpenGL specific books in the book section of Gamedev.net, however I only own OpenGL Game Programming and can therefore only recommend that particular title.

Share this post


Link to post
Share on other sites
As for your first question: consider more common modern games. Most will take place in a dynamic environment in which the player can autonomously navigate. This means that the displayed image will change nearly every frame. Therefore, the view is always drawn each frame regardless of what changed.

The point being is that your approach is in general not so bad, in fact it is very common. Perhaps in the case of hangman, where changes occur only on an event-based and discrete-time basis, it seems not so useful. However, external events may occur which may require you to redraw (if, for example, in windowed mode some nutcrack might drag another window over yours and then remove it and revealing your game again). Moreover, I suppose your graphics code is not very demanding so there is little CPU time involved in redrawing. Where there is no issue, no fix should be applied. Finally, perhaps you want to do some animation later on in the project. This incurs the display being changed each frame, leading you to update each frame as well.

Greetz,

Illco

Share this post


Link to post
Share on other sites
The best way of all, practise. Use it as much as you can, for as many different things as you can. That way you will get a feel for the whole API, and what works, and what doesn't work.

Share this post


Link to post
Share on other sites
OpenGL RedBook by Silicon Graphics, from "firsr hand" I guees would be a good choice. I've read it and obtained a LOT of knowledges 'bout OGL

Share this post


Link to post
Share on other sites
I jumped in with an HTML version of the Red Book, but I recommend "Beginning OpenGL Game Programming" by our very own Dave Astle.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
I jumped in with an HTML version of the Red Book, but I recommend "Beginning OpenGL Game Programming" by our very own Dave Astle.



I second Ravuya's suggestion... Beginning OpenGL Game Programming is an OUTSTANDING book. The OpenGL SuperBible is also a fantastic book.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!