This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

glMapBufferOES fails with GL_INVALID_VALUE in GLES 3.0 Emulator

I have an OpenGL engine set up, and have added OpenGL ES support to it recently. Currently I am targeting android, and in an effort to speed up debugging I have added OpenGL ES support to the windows side of things using the MALI GLES 3.0 Emulator.

I am using the GL_OES_mapbuffer extension if it is available for sprite rendering, falling back to glBufferData if it isn't. This works on both my test phone, which supports the extension, and the android emulator, which doesn't. However running this on my main computer results in the call to glMapBufferOES to return null and calling glGetError returns GL_INVALID_VALUE. I find this strange, since glMapBuffer shouldn't even return GL_INVALID_VALUE, so I assume this is a bug.

I am calling glMapBufferOES with these arguments, it should be valid for OpenGL ES. glMapBufferOES(GL_ARRAY_BUFFER, GL_WRITE_ONLY);

Does anyone have any idea why this would be happening, any help would be appreciated.

Parents
  • Hi Programmdude,

    Firstly, thank you for bringing this to our attention. I noticed that you wrote in your message that you are using glMapBufferOES(GL_ARRAY_BUFFER, GL_WRITE_ONLY). I am guessing you meant GL_WRITE_ONLY_OES, as GL_WRITE_ONLY is not a valid argument for this function. This also may explain why you are seeing an unusual error code as our OpenGL ES 3.0 Emulator works by converting function calls and parameters to their Open GL equivalents. It could be that the emulator tries to convert GL_WRITE_ONLY and is unsure how to convert correctly.

    If this is not the case and you are using GL_WRITE_ONLY_OES would it be possible to get a small reproducer of the issue so that we can investigate further and possibly raise a bug on the tool?


    Many thanks in advance,

    Stephen

Reply
  • Hi Programmdude,

    Firstly, thank you for bringing this to our attention. I noticed that you wrote in your message that you are using glMapBufferOES(GL_ARRAY_BUFFER, GL_WRITE_ONLY). I am guessing you meant GL_WRITE_ONLY_OES, as GL_WRITE_ONLY is not a valid argument for this function. This also may explain why you are seeing an unusual error code as our OpenGL ES 3.0 Emulator works by converting function calls and parameters to their Open GL equivalents. It could be that the emulator tries to convert GL_WRITE_ONLY and is unsure how to convert correctly.

    If this is not the case and you are using GL_WRITE_ONLY_OES would it be possible to get a small reproducer of the issue so that we can investigate further and possibly raise a bug on the tool?


    Many thanks in advance,

    Stephen

Children