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.
The values for GL_WRITE_ONLY_OES and GL_WRITE_ONLY are the same, but I did mean _OES. My program has a gl dispatch system, which is used for both desktop GL and mobile GLES. I wrote a small example based off the cube example, and it still crashes on the call to glMapBufferOES. It's compiled with VC++ 17.00.60610.1 and gnumake 3.82.90, though should compile with any VC++ and possibly any gcc.
My build system is set up differently, so I just copied over the headers, bin and lib files.
Uploaded to dropbox
https://www.dropbox.com/s/d6t6fjun8rydr2f/cube2.zip
Hi Programmdude,
Thank you for the code reproducer you have sent. I have managed to recreate the issue in house. This has now been filed as a bug under the OpenGL ES 3.0 Emulator and passed to the Mali Tools team. I will update you with any updates to the bug being fixed as soon as they arise.
Thank you again for bringing this to our attention.
Cheers,
Stephen