Problems when using UNSIGNED_SHORT_5_5_5_1

This topic contains 6 replies, has 3 voices, and was last updated by  jmpep 9 years, 2 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #29580

    jmpep
    Member

    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.
    jmpep2008-08-31 22:03:47

    #32262

    Edit : Sorry, misunderstood the question.

    peter.quayle2008-09-01 10:02:22

    #32263

    Xmas
    Member

    Hi jmpep,

    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.

    Thanks,

    Georg

    #32264

    jmpep
    Member
    peter.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 6.14.11.7783 (dated 02 of August of 2008).

    Thanks you both 🙂

    jmpep2008-09-01 13:40:55

    #32265

    Xmas
    Member

    Hi,

    do you have a minimal test case that produces the wrong result on your machine? I am unable to reproduce this behaviour.

    Regards,

    Georg

    #32266

    jmpep
    Member

    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 🙂jmpep2008-09-30 15:19:06

    #32267

    jmpep
    Member

    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…

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.