Commit 84e91d39 by Geoff Lang

Add a comment explaining the buffer binding points.

BUG=angleproject:881 Change-Id: If81675ef4931c920edac56249461db7c91cc170c Reviewed-on: https://chromium-review.googlesource.com/261708Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 9dd217bc
...@@ -16,7 +16,14 @@ ...@@ -16,7 +16,14 @@
namespace rx namespace rx
{ {
// Use the GL_COPY_READ_BUFFER binding when two buffers need to be bound simultaneously.
// GL_ELEMENT_ARRAY_BUFFER is supported on more versions but can modify the state of the currently
// bound VAO. Two simultaneous buffer bindings are only needed for glCopyBufferSubData which also
// adds the GL_COPY_READ_BUFFER binding.
static const GLenum SourceBufferOperationTarget = GL_COPY_READ_BUFFER; static const GLenum SourceBufferOperationTarget = GL_COPY_READ_BUFFER;
// Use the GL_ELEMENT_ARRAY_BUFFER binding for most operations since it's available on all
// supported GL versions and doesn't affect any current state when it changes.
static const GLenum DestBufferOperationTarget = GL_ARRAY_BUFFER; static const GLenum DestBufferOperationTarget = GL_ARRAY_BUFFER;
BufferGL::BufferGL(const FunctionsGL *functions, StateManagerGL *stateManager) BufferGL::BufferGL(const FunctionsGL *functions, StateManagerGL *stateManager)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment