- September 20, 2011 at 5:01 am #30637
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.September 20, 2011 at 12:32 pm #35111
If you get error on iOS, that means this is a driver restriction…September 21, 2011 at 10:32 am #35113September 22, 2011 at 2:25 am #35114September 22, 2011 at 12:44 pm #35115
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.