I have a test code below:
glBufferData(GL_PIXEL_UNPACK_BUFFER, render_width * render_height*4, yuvdata, GL_STREAM_DRAW);
GLubyte* ptr = (GLubyte*)glMapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, render_width * render_height * 4, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT );
// update data directly on the mapped buffer
updatePixels(ptr, render_width * render_height * 4);
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER); // release pointer to mapping buffer
It works well by the emulator when I chose 3.0 and 3.1.
while I change to include the gl32.h, compile is ok, but will crash because the ptr cannot write and read after map.
I don't know why. no error when check, just crash when update pixel.
Hi TC, Without more information it's going to be hard to provide any help, but the emulator is very sensitive to the behavior and correctness of the host graphics driver (we're just translating OpenGL ES into host OpenGL calls).
Note that the emulator is an old product, which is not getting any further updates, so we'd recommend trying alternatives such as ANGLE.
Kind regards, Pete
thanks for reply, can you give more information about the ANGLE, dose it depend on android?
I'm a new to this, I want to learn the mali gpu on a embedded linux system.