- August 31, 2008 at 10:02 pm #29580
Hello to all.
I’m trying to display a 16-bit textures in R5G5B5A1 format in OpenGL ES. In order to do so, I am using type=RGBA and format=UNSIGNED_SHORT_5_5_5_1 when calling glTexImage2D. However, the textures are not displayed correctly -and I know that the texture data is correct-.
I have tried with a texture where all the pixels have the same value: 0x7BDF, which corresponds to (0.5, 0.5, 0.5, 1 – that is, 50% grey). However, it is displayed in a yellowish color. However, if instead of using 0x7BDF I use 0x7BEF -which would correspond to use a R5G5A1B5 format- the texture is shown correctly.
I’m pretty new to OpenGL in general, so I can be wrong, but I think that UNSIGNED_SHORT_5_5_5_1 is behaving as UNSIGNED_SHORT_5_5_1_5 would. Is this a bug in the SDK or am I doing something totally wrong?
I’m using the SDK for Windows PC Emulation version is 2.02.22.0756.
jmpep 2008-08-31 22:03:47September 1, 2008 at 9:41 am #32262
Edit : Sorry, misunderstood the question.
peter.quayle 2008-09-01 10:02:22September 1, 2008 at 10:55 am #32263
Could you please let us know which graphics card and drivers you are using? The PC emulation library does not process texture data in this case, it should just be passed on to the OpenGL driver unchanged.
GeorgSeptember 1, 2008 at 1:33 pm #32264peter.qualye wrote:Edit : Sorry, misunderstood the question.
No problem! thanks you a lot for your quick answer 🙂Xmas wrote:Could you please let us know which graphics card and drivers you are using?
Of course. I am using an NVIDIA GeForce 8800 GTX. The version of the driver is 184.108.40.20683 (dated 02 of August of 2008).
Thanks you both 🙂
jmpep 2008-09-01 13:40:55September 30, 2008 at 11:29 am #32265
do you have a minimal test case that produces the wrong result on your machine? I am unable to reproduce this behaviour.
GeorgSeptember 30, 2008 at 3:16 pm #32266
Oops, the application in which I found that problem is everything but minimal… I’ll try to create one this afternoon and post it here 🙂
jmpep 2008-09-30 15:19:06September 30, 2008 at 5:56 pm #32267
Hm, I’ve tried to reproduce the error in a smaller application and I have been unsuccessful… It is quite strange, because in the application from which the error comes from, when I use the same code but with OpenGL instead of OpenGL ES it works perfectly.
I’ll try to find the error as soon as I have some more time…