Question for glVertexAttribPointer in IOS'GLES

    Hello everyone,I hava a big question these days that if the glVertexAttribPointer in Iphone/Ipad'GLES 2.0 do not support the type GL_HALF_FLOAT_OES?I have try to pass the parameter GL_HALF_FLOAT_OES and then I do a GL_ERROR check.There is a error that the enmu type is not correct.Iphone use the POWERVR graphics chip.But I also use GL_HALF_FLOAT_OES for glVertexAttribPointer  in other platform which also use the  POWERVR graphics chip and it works good.

    Is anyone knows that? How can I do it?Plese help me,thanks.

If you get error on iOS, that means this is a driver restriction…

Is there anyting I can do with this?

The OES suffix in GL_HALF_FLOAT_OES indicates that it’s part of a GL extension. If you are using an extension, you should always check that the extension string contains the extension you need. In this case you should be looking for GL_OES_vertex_half_float.

Yes,here I do not  see GL_OES_vertex_half_float on IOS’GLES.The display of the object is not correct.However I could see the  p<SPAN =short_text lang=en id=result_ c=“4” a=“undefined”><SPAN =hps closure_uid_b4ilaq=“165”>rofile  of object that’s means the vertex data are not missing.So I think maybe there is a way to do with this.

Hi snowraindy,

It’s possible that the driver is still accepting data but not acknowledging the format you’ve chosen, and so it’s likely being left as whatever was set before (GL_FLOAT is the default), while still setting up your pointer. This would mean that data was getting passed and used, but GLES has no way of correctly interpreting it as the extension is unsupported.

Depending on the type of data you’re using it would probably be best to either switch to GL_SHORT and using this (either directly or as a fixed point value) or just use full floating point. Which you choose depends on the range of values you’ve got and the number of vertices you have.



Thanks a lot,I see.