Jump to content
  • Advertisement
Sign in to follow this  
Mavericky

OpenGL ES [ES2.0] Copying Internal Array Buffers

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!