Skip to main content
GameDev.net gamedev.net
🔒 Locked

[ES2.0] Copying Internal Array Buffers

Started by Mavericky Apr 20, 2019 at 4:51 AM 1 replies 2.7k views
Original Post
Mavericky
Mavericky

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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.