I am loading images for use in 2D texture mapping. OpenGL textures must
have a size that is a power of 2. So, I have a scaling routine, which takes
the GL image, and scales it up to the next closest power of two. It uses
Most of my images are ~200pixels in size, and scale to 256. However, a
couple of them are ~300 pixels. These of course, should scale up to 512
When calling gluScaleImage() with the larger images, my program crashes.
Illegal read of address ... etc.
It only crashes when reading these larger images. The image I am inputting
is GL_RGB, GL_UNSIGNED_BYTE, and GL_UNPACK_ALIGNMENT 1 byte. The output
image is the same, except with a different size.
Have you heard of gluScaleImage crashing like this? I am running Windows NT
4.0, with Service Pack 3. The app I am writing also runs on the Power
Macintosh. Oddly enough, it crashes on the PC, but not on the Mac. So, the
arguments I'm passing to gluScaleImage are correct, but something with the
Windows GLU library must be screwed up.
New River Kinematics