🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

[ES2.0] Copying Internal Array Buffers

Started by
1 comment, last by Steve_Segreto 5 years, 2 months ago

Preface: I'm on android using C++ with the NDK.

I'm upgrading some old GL ES 1.0 code to GL ES 2.0 and have two internal array buffers already. In my code I simply want to copy from one buffer to the other.

Originally I bound the buffers with `GL_READ_ONLY` and `GL_WRITE_ONLY` and used


glCopyBufferSubData(GLEXT_GL_COPY_READ_BUFFER, GLEXT_GL_COPY_WRITE_BUFFER, 0, 0, sizeof(Vertex) * vertexBuffer.m_size));

To copy over. This function is not available on mobile and (correct me if I'm wrong) it seems my only options are `glBufferData` and `glBufferSubData` which take pointers to arrays on the CPU to be used for drawing.

How can I copy an already existing, internal buffer array to another internal destination buffer?

Advertisement

You probably already realized this, but glCopyBufferSubData is available in GLES 3.0 if you would rather migrate from 1.0 to 3.0 in one step.

This topic is closed to new replies.

Advertisement