Recommended Posts

Hi
I''m trying to use texture mapping in a simple open gl program, put a bmp on each side of the cube but when I try to compile some code I got from the NeHe website (tutorial 6) my compiler (Borland 5.5) gives me an error: unresolved external ''auxDIBLoadImageA'' reference from c:\borland\bin\opengl.obj.
I have got the glaux library (a new one from the borland site yesterday) . Is there another way to use bitmaps for texture mapping or am I doing something wrong? Please HELP, i''ve been trying to fix this small problem for ages!!
Thanks

0

Share this post

Link to post

Share on other sites

In the header file, there should be a #define mapping functions foo to fooA or fooW (if I remember correctly), based on a switch dependent on the configuration of your system. Try to fiddle with it. That, or examine what functions actually are declared in your obj file (with an hex editor, the function names are in clear text somewhere in the file).

good luck

0

Share this post

Link to post

Share on other sites

If you have the glaux library in the compilers lib directory should it work. You have to include glaux.lib in your command line or project.If something is wrong with your downloaded file can you get it from the Borland ports of the NeHe lessons. It is many ways you can load images files and most of them is better than using glaux.

0

Share this post

Link to post

Share on other sites

glaux is not updated anymore(deprecated). There used to be docs in old msdn library but not anymore. You could use PNG file format for images and libpng(www.libpng.org) to load/save them so basically you can replicate that auxDIBLoadImage() function. If you''re wondering what the A and W stand for A is for ascii(one char equals one byte) and W is for wide(one char is two bytes or similarly UNICODE). Some languages have more characters thus two bytes are used to represent them. I''m planning on moving away from bmps and use pngs. Pngs can be compressed and each pixel can contain an 8-bit alpha channel, I think.

Share this post

Link to post

Share on other sites

from the forum faq:"Also, if you really want to learn about loading a a texture, go over to NeHe"s Site and check out lesson 25. But, if you can avoid it, DO NOT USE THE GLAUX LIBRARY (glaux.lib). Its incredibly outdated, and is not worth your time. And please, no more questions about glaux.dll. It does not exist !"

"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"