Hey everyone,
I have a quick question. I am texturing some objects in my scene, however
the textures that I have do not have a width and height that is a power of
2. I am trying to use gluScaleImage() so that I don't have to manually
resize all of the images that I am using as textures. However the
gluScaleImage always crashes out my program and I'm not sure why. I have
searched through the forum already, and there does not seem to be an answer
there to my question.
Below is the code that I am using to call gluScaleImage().
1. I create an NSBitmapImageRep from an image file and also allocate space
for another bitmap image called bmpResizedImage which will store the newly
resized bitmap image.
NSBitmapImageRep *imageRep = [NSBitmapImageRep
imageRepWithContentsOfFile:fullTexturePath];
NSBitmapImageRep *bmpResizedImage = [NSBitmapImageRep alloc];
2. I then make a call to gluScaleImage where imageType is GL_RGB.
gluScaleImage(imageType, [imageRep pixelsWide], [imageRep pixelsHigh],
GL_UNSIGNED_BYTE, imageRep, 256, 256, GL_UNSIGNED_BYTE,
bmpResizedImage);
If anyone has any ideas or comments about what needs to be changed. It
would be greatly appreciated.
Thanks
Danielle
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden