I use gluScaleImage function for loading a texture. It works with 32bpp but with 16bpp my texture is totally black. The buffer for the scaled image is well allocated (by SDL) ; moreover I fill it with red color and I think I give the correct parameters to the function :
I might be wrong but to my knowledge that glu scale is just a pure C function and nothing is done in GL, so no GL error
And as glu is quite old there werent such packed formats I think
according to reference the typein/typeout can only be
GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, or GL_FLOAT.
Thank you for your lights CrazyButcher.
So as there is no GL error returned by glGetError after glu function calls, I’ve tested the returned value of gluScale and I’ve got the error “enum not valid”. So GL_UNSIGNED_SHORT_5_6_5 is not a correct parameter for the function.
Although, according to this reference page , it should be. Too bad…
So I will scale a 32 bits image and then use SDL to convert it to a 16 bits image… that should work