Question for glVertexAttribPointer in IOS’GLES

This topic contains 6 replies, has 4 voices, and was last updated by  snowraindy 6 years ago.

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

    snowraindy
    Member

        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.

    #35111

    StiX
    Member

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

    #35112

    snowraindy
    Member

    Is there anyting I can do with this?

    #35113

    Xmas
    Member

    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.

    #35114

    snowraindy
    Member

    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  profile  of object that’s means the vertex data are not missing.So I think maybe there is a way to do with this.

    #35115

    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,

    Tobias

    #35116

    snowraindy
    Member

    Thanks a lot,I see.

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