November 1, 2007...7:31 pm

One Helpful Resource…

Jump to Comments

Nothing Beats Useful Information

For a while now I’ve been fumbling around working on my little side projects and such and just recently decided to get serious about them. I’ve been spending more time improving upon a few things in my current project. Yet the more time I spend on it, the more problems I uncover. I guess this is a good thing because now I can really learn from my mistakes and make some *real* improvements.

My project is being developed in MS Visual Studio, on my new laptop which runs Vista. A recent error I kept getting had to do with running the .exe outside of the development environment. The debugger kept pointing me to problems with one of the libraries my program was using. For a simple function, loading bitmaps so I can texture the 3D scene, I was using some glaux code from the glaux library. Many tutorials for OpenGL use the glaux library in their programs. auxDIBImageLoad(Filename) allows me to load in my bitmap file. Using that function and a few other lines of code, gives you a small sized function that enables your program to load images as textures.

Some really good textures are available just searching the web.

Now there were no problems at all when I compiled the project. The problem was only discovered when I tried to run the .exe itself instead of running it from within Visual Studio.

I tried to debug this error but couldn’t figure out why it was giving me trouble so I decided to search around the internet for information on glaux. That’s when I found one really helpful resource for replacing all the glaux code required for loading textures with code using another library glbmp.

I had never heard of glbmp until that point. It is described as — … a lightweight and portable partial glaux replacement, providing auxDIBImageLoad and related device-independent bitmap image loading functionality. At the basic level, it’s a flexible bitmap loader and decoder that can be used anywhere the color data of a bitmap is required. I decided I’d try to replace my glaux code with the glbmp code and see if that was the issue.

After replacing the code and making a few of my own adjustments, I breathed a sigh of relief when the .exe finally ran.

The glaux to glbmp replacement tutorial is one helpful resource.

1 Comment

  • hi,
    can you post the source code used to replace the auxDIBImageLoad? i’m getting crazy with itand i can’t get the glbmp work.

    thanks a lot :)


Leave a Reply