Porting from GL to ES 2.0

Hi all, if anyone here has experience porting from GL to ES 2.0, do you know what might be causing the problem below:

The vertices themselves all appear to be in the correct place, so I’m wondering what is causing the triangles to be drawn the way they are. The model appears correctly in GL. Im thinking it might possibly be an issue with the ordering of the triangles?


What platform are you using? Could you share the shaders? Also, how is it supposed to look like?

Are you using glDrawElements and if so, does the format of your index data match the type argument in the function call?

Xmas, at the moment im just developing on X86 with the Mali ES 2.0 emulator. I’m told by the engineers that this just translates ES calls into GL calls. Peter, yes I’m using DrawElements, and I believe the format of the index data is at fault here. The shader is fine as other things work well, its just certain types of models particularly character models that are at fault. In the GL version, GLSL is used for this work so the ES shader is very close in its implementation.

I’ll keep having a fiddle with the index data and try and work out the issue, Just wondered if anyone else had a similar problem and could point out anything obvious to check first!

PS: He’s meant to look like this!

EDIT: Dont know where his feet are in the first one, and in each one, stuff like the arm being held up, and the spikes on the torso are on opposite sides!!chrisvarns2010-08-26 14:45:54

Hi Chris. Have you had any luck with this issue yet?

It may be easier for us to support you with this problem if you use the ES emulator in the PowerVR SDK instead of the Mali emulator (that way we can tell you if this is an issue with your code, or a problem with the emulator’s interpretation of the call)

No luck so far. As the code I’m porting is based on the qfusion engine, the list of problems porting it from GL to ES 2.0 is too long to write. At the moment I think its an issue with GLSL, as in the GL version this is treated as an extension, but is inherent in ES. I’ll try with the VR emu just to rule it out!