Jump to content
  • Advertisement
Sign in to follow this  
caldiar

Converting Lesson 10 from Glaux to GLUT

This topic is 4835 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

Hey everyone. Working with lesson 10 (the simple map loading one) from nehe.gamedev.net (go figure lol) I really don't like glaux. Not only do I no longer have the file, I find GLUT easier to work with even though I don't have much experience with it. What I want to do is convert the glaux code in lesson 10 so that the demo uses GLUT. The one thing that has me stuck the most is the texture loading and binding. Should I simply replace the glaux commands with the GLUT equivilant and leave the rest of the code intact or would that cause some issues? Im going to screw around a bit more after this post and Ill post back on this thread if I manage to fix my problem. Any help is greatly appreciated. Thanks for your time =) ~Brandon Haston~

Share this post


Link to post
Share on other sites
Advertisement
Again, I get mixed up.

GLUT is for windows creation and management o.O

Glaux is known to have memory leaks which makes me really not want to use it.

Ok so we have glaux, gl, and glu for lesson 10 if I remember correctly.
The demo is using the Win32 HWD type thingy to set up a window and control it. This makes for tons of lines which can be summarized in something like 8 lines with GLUT.
Glaux needs to be replaced as well. Perhaps I could write a bmp loading function and replace the glaux crap that loads up the bmp with the bmp loading function.

Any alternatives to glaux that you can think of? Id be really interested in hearing about it =) Thanks again for your time!

~Brandon Haston~

Share this post


Link to post
Share on other sites
well to replace glAux in a cheap and fast way you could download the glAux replacement code on the NeHe front page or folow the link in my sig.

For a more longterm solution you will have to fastforward a couple of lessons to lesson 24 where you will learn how to load tga files (witch by the way are better than bmp files).
writing your own bmp loader is a good thing, not only will it replace the glaux replacement, but it will tech you many things in the art of writing file loaders.

I wouldn't recomend anyone to replace a working windows creation and manager with GLUT(or anything else for that matter) just because it looks easier, only if your doing it from scratch for some reason.
just contain it in one separate file and you will be ok.
Download the nehe basecode and see how it's done.

Share this post


Link to post
Share on other sites
I would suggest SDL. It can do everything glut can plus load bitmap files (and quite a bit more). If you add SDL_IMG library, you can easily load pretty much any image file with a single function call!

Share this post


Link to post
Share on other sites
I always see this question, but Lesson 10 already exists for GLUT. It's just listed under GameGlut. just select no, when the message box asks you if you want to use GameGlut and there you go! [smile] If I am mistaken, someone please correct me though. I just downloaded it and it looks like glut to me [wink] Cheers!

Share this post


Link to post
Share on other sites
Well Ill be damned
However I took a look at lesson 24 of nehe.gamedev.net and started tinkering with the TGA loading. I dunno if it works so great or not though because I get this error:
[linker error] undefined reference to 'LoadTGA(char*)'

oh well Ill figure it out =)

I was thinking about looking into SDL but GLUT just feels.... right to me. Can't explain why Im so attracted to it haha =)

Thanks for the help everyone!

~Brandon Haston~

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!