PDA

View Full Version : How to use gluScaleImage() ?



B_old
04-25-2003, 02:43 AM
Hi.
I want to use gluScaleImage() to make my textures smaller.
But how do I use it?
This is what I does:



gluScaleImage(GL_TEXTURE_2D, Image->Width, Image->Height,
ColorType, Image->Data, 64,
64, ColorType, Image->Data)

And it gives me an error.
Does the ratio matter?
I do this after loading my TGA and before loading the data up to OGL.
Thanks for any advice.

Bob
04-25-2003, 03:13 AM
Check out some documentation (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/glufnc01_3k4l.asp) about gluScaleImage. First parameter is wrong. And don't pass the same pointer for in and out image. Allocate a new buffer for the scaled image.

B_old
04-25-2003, 05:34 AM
Thanks for the hint!
I'll check it out!

EDIT:
Thanks again, works fine.

[This message has been edited by B_old (edited 04-25-2003).]