angle::Result TransformFeedbackGL::bindIndexedBuffer( const gl::Context *context, size_t index, const gl::OffsetBindingPointer<gl::Buffer> &binding) { // Directly bind buffer (not through the StateManager methods) because the buffer bindings are // tracked per transform feedback object mStateManager->bindTransformFeedback(GL_TRANSFORM_FEEDBACK, mTransformFeedbackID); if (binding.get() != nullptr) { const BufferGL *bufferGL = GetImplAs<BufferGL>(binding.get()); if (binding.getSize() != 0) { mFunctions->bindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, static_cast<GLuint>(index), bufferGL->getBufferID(), binding.getOffset(), binding.getSize()); } else { mFunctions->bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, static_cast<GLuint>(index), bufferGL->getBufferID()); } } else { mFunctions->bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, static_cast<GLuint>(index), 0); } return angle::Result::Continue; }
void TransformFeedback11::bindIndexedBuffer(size_t index, const gl::OffsetBindingPointer<gl::Buffer> &binding) { mIsDirty = true; mBufferOffsets[index] = static_cast<UINT>(binding.getOffset()); }