PDA

View Full Version : Using IBO offset causing crash with OpenGLES 1.1



Ro_land
01-19-2012, 12:13 AM
Hello all,

I am using a mobile device with Adreno 205 ( HTC Desire HD ) and OpenGL ES 1.1 for my application ( no shaders involved ).
Thinking of improving performance I moved to using VBO/IBOs in my rendering but found out that glDrawElements crashes when I use its last parameter for rendering from a certain offset in the index buffer object. It is always working with zero offset but does not like index offsets different from zero. I over analyzed every aspect ( data, offsets ) and everything is ok, the same code is working perfectly on my desktop computer.
My vertex attributes are just float type coordinates GL_FLOAT ( 12 bytes total ) and index type is GL_UNSIGNED_SHORT ( 2 bytes ).
Is there an explanation for this behavior?

My system info is:
GL_VERSION OpenGL ES-CM 1.1
GL_VENDOR Qualcomm
GL_RENDERER Adreno 205/225


PS my latest tests shows that there is a strange 32k limit for offset. When the offset is pointing to less than 32k but different from zero and the count reaches beyond this 32k limit, it crashes. Otherwise it is working fine.
I also tested the same code on a Samsung Galaxy S2 with Mali400 GPU and it is working fine. The problem persists with the Adreno GPUs.

Ro_land
01-19-2012, 01:30 AM
I am correcting my PS observation: When the offset is different form zero and offset + count is pointing to less than 32k bytes, it crashes. Otherwise it is working fine.