I want to rescale image...

Hi ; I am high school student in Asia…

(So I can’t speak English well)

I’m making small game for training.

But I have big trouble now…

I want to use 300 * 200 sized image to

texture.

Some people advised me to use ‘gluScaleImage’

But if I use this function,I always get

strange image…

Can I use gluScaleImage to rescale 300*200

sized image to 256*256 sized image?

I need your help

I haven’t tried your exact parameters, but it should be possible.

Are you using the correcte format and type settings?

format = GL_RGB (or GL_RGBA)
typeIn = GL_UNSIGNED_BYTE
typeOut = GL_UNSIGNED_BYTE

Maybe…

I use correct parameters…

Have you tried using gluBuild2DMipmaps?

It does the scaling automatically for you (the texture does not have to have a size that is a power of two).

So what do you mean by ‘strange’ image?

Originally posted by marcus256:
[b]I haven’t tried your exact parameters, but it should be possible.

Are you using the correcte format and type settings?

format = GL_RGB (or GL_RGBA)
typeIn = GL_UNSIGNED_BYTE
typeOut = GL_UNSIGNED_BYTE[/b]

Also
glPixelStorei(GL_UNPACK_ALIGNMENT, ?);
glPixelStorei(GL_PACK_ALIGNMENT, ?);

V-man

Hmm…;

I got ‘broken’ image…;