[core] move IndexBuffer to gfx namespace

This commit is contained in:
Konstantin Käfer
2019-03-05 16:07:58 +01:00
parent f13c2b86e4
commit 4737a45383
21 changed files with 85 additions and 49 deletions

View File

@@ -1,12 +1,15 @@
#include <mbgl/gl/vertex_array.hpp>
#include <mbgl/gl/index_buffer.hpp>
#include <mbgl/gl/context.hpp>
namespace mbgl {
namespace gl {
void VertexArray::bind(Context& context, BufferID indexBuffer, const AttributeBindingArray& bindings) {
void VertexArray::bind(Context& context,
const gfx::IndexBuffer& indexBuffer,
const AttributeBindingArray& bindings) {
context.bindVertexArray = state->vertexArray;
state->indexBuffer = indexBuffer;
state->indexBuffer = reinterpret_cast<const gl::IndexBufferResource&>(*indexBuffer.resource).buffer;
state->bindings.reserve(bindings.size());
for (AttributeLocation location = 0; location < bindings.size(); ++location) {