Sign in to follow this  
eSCHEn

Interim Forum FAQ

Recommended Posts

I've been at NeHe for a few years now and I notice the same questions cropping up so I thought a FAQ might be a good idea. I've started one out and I've included it below. Please let me know if you think this is a good idea, I'm overstepping the mark, my answers suck or whether anything needs to be added. Hopefully if this turns out to be a useful thing then perhaps a moderator would sticky it for us. Thanks. [smile]

NeHe Productions FAQ

This forum is for the discussion of NeHe's tutorials and projects although discussion about any aspect of OpenGL is welcome and in fact encouraged. If you have a more general OpenGL question then you might want to look at the OpenGL forum FAQ here. Two superb resources for OpenGL information are the OpenGL Programming Guide, known as "The Red Book" and the OpenGL Reference Manual, known as "The Blue Book".

Frequently Asked Questions

Links

Resources

Answers to Frequently Asked Questions

  • When I compile a lesson I get '[Linker error] undefined reference' or 'error LNK2019: unresolved external symbol', what's going on?
    Answer: You have not linked the relevant libraries for your linker and so when you compile the files holding the methods from the header (.h) files they are not found. To resolve this follow these steps:

    Dev-C++
    Go to your linker options using 'Project > Project Options > Parameters Tab > Linker Box' and make sure you have the following included:
    -lopengl32
    -lglu32

    Microsoft Visual C++.
    Add the following lines under at the start of the .cpp file:
    #pragma comment(lib, "opengl32")
    #pragma comment(lib, "glu32")

  • When I try to run a program I get 'missing glaux.dll'?
    Answer: You need to place the glaux.dll in the same folder as the executable (.exe) file. To get the glaux.dll file see here. A forum poster (lc_overlord) has kindly donated some replacement code so you don't have to use the glaux.dll file at all, see this thread for instructions on how to use it.
  • When I try to run a program I get 'missing glut32.dll'?
    Answer: You need to place the glut32.dll in the same folder as the executable (.exe) file. To get the glut32.dll file, download the 'glut-3.7.6-bin.zip (117 KB)' file from here.
  • NeHe has been taken over by GameDev, what's happening with that?
    Answer: After many personal problems Jeff Molofee (NeHe) decided to sell NeHe Productions to GameDev who are currently in the process of updating the site, adding new content and other time-consuming things. See this thread, this thread and this threadfor more answers.

    Update 2006-03-11: Andrew Russell has been named as the new moderator for the NeHe forums, for more details see this thread.

    Update 2006-05-18: Andrew Russell has made a post looking for skilled C++/OpenGL coders. Presumably this means that plans have been made for the site and that the ball should start rolling soon. This thread has all the details.
  • How do I post source code? How do I make a hyperlink?
    Answer: Please see this FAQ.
  • My rotations and translations are not working correctly!
    Answer: Remember that the order in which you do rotations and translations is very important, for example rotating 45° about the z-axis and then translating 3 units on the y-axis is very different from translating 3 units on the y-axis and then rotating 45° on the z-axis. The Red Book (see link at the beginning of this document) has a very good example in it.
  • My object is coloured incorrectly!
    Answer: OpenGL is a state machine, that is to say whatever values you set will stay the same until you change them. To draw an object green then another blue you would use:
    // set colour to green
    glColor3f(0.0f, 1.0f, 0.0f);
    // render green object
    /* COLOUR IS STILL SET TO GREEN! */
    
    // change to blue colour
    glColor3f(0.0f, 0.0f, 1.0f);
    // render blue object
    /* COLOUR IS NOW BLUE! */
    If you've tried these steps and still have incorrect colours then you may have enabled lighting and this is causing the colours to not work. This can be resolved by telling OpenGL to blend lighting and colours together. To do this add "glEnable(GL_COLOR_MATERIAL)" to the initialization part of your program, i.e. after you set up OpenGL.
  • My screen is black, what do I do?
    Answer: There are a variety of reasons why this might happen, please describe your situation in detail on the forum and we will try our best to help.
  • How big is 1.0f in OpenGL? How many pixels is 1.0f in OpenGL?
    Answer: It can be pretty much any amount, it depends on how far away from the camera you are, assuming a perspective projection that is. As an example, take your finger, let's say it's 20mm wide, now hold it as far away from your face as possible, it looks a lot smaller doesn't it? Now hold it right in front of your face, it looks a lot bigger. This is the problem, OpenGL will render your scene and it is totally dependent on where you are looking from as to how many pixels are occupied by an object.
  • My light(s) don't work as I want them to.
    Answer: Lights in OpenGL are affected by modelview transformations, that is to say glRotate* and glTranslate* calls will affect the light, check the Red Book link earlier in this document for more advice.
  • When's the next NeHe competition and what's it going to be about?
    Answer: As the site is being overhauled at the moment there isn't anything planned as yet. A forum member (llvllatrix) has run a couple of contests using this forum and extremely generously donated the prizes from his own pocket. He has written a document on managing a contest here and some potential contest themes here
  • Why is nobody responding to my post?
    Answer: People usually ignore posts that do not have enough detail. Here are some tips on posting:
    • The first thing you should always do is search for a solution; people ignore posts that have obvious solutions. There is a high probability that some one else has had similar problems and has already found a solution. Searching both Google and the forums for an answer should always be done before posting.
    • POST CODE! This is the best way to increase chances of getting a reply/solution to your problem. Please see here on the correct way to post code.
    • Describe your intentions and give context. The more we know about the problem, the better we can help. It may be that there is a better/easier solution to your problem.
    • A screenshot or two could be helpful to showcase any graphical errors. Try using ImageShack or Photobucket if you don't have your own storage space.
  • I want to make a great game but I am new at this, tell me what I should do.
    Answer: Hold on a minute, making even the simplest game takes a lot of work. A normal game that you buy in a store can take a 15 person team of professionals 2-3 years to make, a MMORPG takes a lot longer with a lot more personnel. To start with, go though NeHe's tutorials from first to last, then you can start out making ultra-simple game clones, such as Pong or Space Invaders. Try this article and also this article for more guidance.
  • I can't get textures to work properly, my object is textured incorrectly, my object shows up as white when I texture it or my texture is not used?
    Answer: Remember that colours are set until you change them, see this answer for more information. You may have inadvertently set up your texture co-ordinates incorrectly, a common problem is that the texture appears to be one colour or it is stretched or smeared across an object. This is usually caused when no texture co-ordinates have been set and therefore OpenGL uses its default set of co-ordinates for each vertex, resulting in a single coloured object or stretch/smear effect. Generally, you should be using a separate co-ordinate for each vertex using glTexCoord2f. Have a look at Chapter 9 in The Red Book here for examples and information on texture mapping. If you find that your object is not textured at all or is showing up as totally white then check that your program can actually find the texture in question. Some compilers, such as Microsoft's Visual Studio variants, temporarily change the directory the program runs from when you run it from the IDE. To see if this is your problem then make sure you use an absolute path to a simple directory to test. For example, move the texture to the root of the C: drive and load your texture in your source with "C:\\texture_name.blah" and see if that solves the problem. Another problem that can occur is that you either haven't loaded your texture or it is not at the ID you think it is. I.e. you loaded your texture into ID 2 but are trying to bind the texture at ID 3, which doesn't exist. In these cases you will generally just get a pure white texture instead.

Contributors

FAQ maintained by eSCHEn. Many thanks to the following contributors: llvllatrix, lc_overlord, DrewGreen, Dybbuk, Kazgaroth, gregs

Revision 1.10 | 2006-05-18
[Edited by - eSCHEn on May 18, 2006 4:32:21 AM]

Share this post


Link to post
Share on other sites
Very nice,

You may want to integrate these into the document:
http://www.eng.uwaterloo.ca/~rramraj/Gamedev/Management.htm
http://www.eng.uwaterloo.ca/~rramraj/Gamedev/Themes.htm
You should probably also throw a link to the RedBook in the resources section; many answers are easily found here. If you need any help, PM me.

Keep up the good work,
- llvllatrix

Share this post


Link to post
Share on other sites
Added the red book and blue book links. Took them from the OpenGL forum FAQ, so I hope they don't mind. [embarrass]

I added your documents in and explained what they were about, is the text acceptable for you?

Thanks for those!

Share this post


Link to post
Share on other sites
Added some red text to show where work needs to be done.


No, I think the documents are fine as they are really. I don't think adding loads of new possible themes is that important at the moment as people will be burnt out from the 4E4. The contest specification you provided is very good, I don't think it needs any work really.

[Edited by - eSCHEn on November 4, 2005 9:23:25 AM]

Share this post


Link to post
Share on other sites
These are off the top of my head; at work now, so I'll elaborate later.

Q: My screen is all black, what do I do?
A: There are a variety of reasons why this might happen, please describe your situation in detail on the forum and we will try our best to help.

Q: Why is no one responding to my post?
A: People usually ignore posts that do not have enough detail. Here are some tips on posting:
- The first thing you should always do is search for a solution; people ignore posts that have obvious solutions. There is a high probability that some one else has had similar problems and has already found a solution. Searching both google and the forum for an answer should always be done before posting.
- POST CODE. This is the best way to increase chances of getting a reply/solution to your problem.
- Describe your intentions and give context. The more we know about the problem, the better we can help. It may be that there is a better/easier solution to your problem.

Share this post


Link to post
Share on other sites
Added two questions and answers by llvllatrix.
Added 'Contributors' section.
Added link to GLUT files in 'Resources' and 'missing glut32.dll' answer.
Fixed some name anchors.


Good questions llvllatrix, thank you for those. Is a credit at the end appropriate or would you prefer it to be at the end of the answers you provided? For example, "This is what you have to do. Submitted by llvllatrix".

Do you think think that the first question is clear enough? I realise that each linker will spew a different error but I was trying to make it so that it was a catch-all for the popular linkers.

Share this post


Link to post
Share on other sites
Nice idea with this faq.

first an addition to the "Why is nobody responding to my post?" question.
-a screenshot or two could be helpfull to showcase any graphical errors, use imageshack or photobucket if you don't have your own storage space.

second, the faq should link to nehe.gamedev.net since some people came here though google or some other site that linked to this forum.

here is a try at a question i have seen here.

q: I want to make a great game, but i am new at this, tell me how i should do.

a: Hold on a minute, making even the simplest game takes a lot of work.
A normal game you buy in a store can take a 15 man team of proffesionals 2-3 years to make, an mmorpg takes a lot longer with a lot more manpower.
My suggestion is simple, go though the tutorials from first to last.
And then you start out making ultra simple game clones, like pong or invaders.
Good games can only be made with experience, great games are made by gods.

Share this post


Link to post
Share on other sites
Added screenshot suggestion to 'Nobody is answering my post' answer.
Added 'I want to make a game' question and answer. Cleaned up the wording slightly and added a couple of links to useful articles.


Thanks for those mate, most appreciated. What do you mean by "second, the faq should link to nehe.gamedev.net since some people came here though google or some other site that linked to this forum."?

Share this post


Link to post
Share on other sites
Added linker fix for Dev-C++.
Added linker fix for MSVC.
Added answer to rotation and translation question.
Added question and answer about lights.
Updated Blue Book link.


Thanks for that new link Drew, very kind of you. [smile]

If anyone does manage to find a link to the Glaux header and dll would they let me know? I don't have any access to my webspace so I can't post the zip I have up.

Also, could a VC6 user tell me what the linker error looks like if you don't link the OpenGL and GLU libraries?

Share this post


Link to post
Share on other sites
Just to say 'thanks' to the Moderator/Staff Member who made this a sticky, saves me rooting around for it. [smile]

I'm looking for suggestions for questions and/or answers still if anybody would care to add them?

Share this post


Link to post
Share on other sites
Hey,

Nice idea with this faq!

I have somthing to add.
I also had a lot of question about wrong or missing colors. (My object is coloured incorrectly!)
Most of the times this occured when they enabled lighting, wich disabled their color.
This problem can be resolved by enabling GL_COLOR_MATERIAL. ( glEnable(GL_COLOR_MATERIAL); )

Maybe you could add this info to your answer to the "My object is coloured incorrectly!" question.

Share this post


Link to post
Share on other sites
Added Dybbuk's answer to colouring question.
Added a general texture problem question and answer.


Thanks for that answer Dybbuk. [smile]

Just for information, I am still checking and updating this list, it's just that I'm a bit busy recently and so it may take a few days for me to do any changes.

Share this post


Link to post
Share on other sites
Added another link to a thread containing information about the progress on the NeHe site.


Not a huge update I know but I just wanted to make a note of it in this thread in case it disappears from the first page of listings.

Thanks to evolutional for unlocking the thread for me, cheers man!

Share this post


Link to post
Share on other sites
I linked both this thread and the OpenGL FAQ in the NeHe FAQ a while back, but it's starting to look a little more complete than it did at that stage. I'm sure Andrew will be along to take a look sometime shortly and perhaps think about putting some of the content in the actual FAQ.

If I may make a suggestion, it might be nice to have the questions repeated with thier answers so you don't have to go back up to the top to know what question goes with an answer.

Share this post


Link to post
Share on other sites
Added a repeat of the question at the beginning of an answer after Kazgoroth's suggestion.
Changed title to 'Interim Forum FAQ' as document is looking reasonably finished.


Thanks for that suggestion Kazgoroth, I can't believe I didn't think of it earlier. It really makes everything a whole lot clearer.

Is there any chance of GameDev hosting a zip file with all of the Glaux gubbins in it for this FAQ? I have it lying on my hard drive here and it includes the headers, dlls and Delphi bindings as well as C & C++ ones. Weighs in at about 128Kb. I'd put it on my webspace but I think it'll get a lot of hits and I don't want my very kind webhost to come and tell me off for it.

Share this post


Link to post
Share on other sites
Added link to Glaux download.
Added new information on "What's happening with the site?" answer.


Hey gregs, thanks a lot for that link, I've been looking for one for a while now. It's great to finally get rid of all the nasty red bits in the FAQ. I share your 'eeew' sentiment though [sad].

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this