diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-18 15:32:49 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-20 13:24:20 +0300 |
commit | 76fc07c606fa62fefc1e2aa435a51a8b5fd384cd (patch) | |
tree | f95d3a09f6f58df952340809b104e25a6fb033a7 /src/mbgl/geometry | |
parent | 760a692378a8ae7c9cc87246c10f2fe9a64117bd (diff) | |
download | qtlocation-mapboxgl-76fc07c606fa62fefc1e2aa435a51a8b5fd384cd.tar.gz |
[core] Autogenerate Shader name
Diffstat (limited to 'src/mbgl/geometry')
-rw-r--r-- | src/mbgl/geometry/vao.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/geometry/vao.hpp | 12 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/mbgl/geometry/vao.cpp b/src/mbgl/geometry/vao.cpp index d797a11b41..30f5484896 100644 --- a/src/mbgl/geometry/vao.cpp +++ b/src/mbgl/geometry/vao.cpp @@ -31,7 +31,7 @@ void VertexArrayObject::bindVertexArrayObject(gl::ObjectStore& store) { MBGL_CHECK_ERROR(gl::BindVertexArray(*vao)); } -void VertexArrayObject::verifyBinding(Shader &shader, GLuint vertexBuffer, GLuint elementsBuffer, +void VertexArrayObject::verifyBinding(Shader& shader, GLuint vertexBuffer, GLuint elementsBuffer, GLbyte *offset) { if (bound_shader != shader.getID()) { throw std::runtime_error(std::string("trying to rebind VAO to another shader from " + diff --git a/src/mbgl/geometry/vao.hpp b/src/mbgl/geometry/vao.hpp index 6821be182a..aa0a72ec59 100644 --- a/src/mbgl/geometry/vao.hpp +++ b/src/mbgl/geometry/vao.hpp @@ -10,8 +10,6 @@ namespace mbgl { -class Shader; - class VertexArrayObject : public util::noncopyable { public: static void Unbind(); @@ -19,8 +17,8 @@ public: VertexArrayObject(); ~VertexArrayObject(); - template <typename Shader, typename VertexBuffer> - void bind(Shader& shader, VertexBuffer &vertexBuffer, GLbyte *offset, gl::ObjectStore& store) { + template <typename VertexBuffer> + void bind(Shader& shader, VertexBuffer& vertexBuffer, GLbyte* offset, gl::ObjectStore& store) { bindVertexArrayObject(store); if (bound_shader == 0) { vertexBuffer.bind(store); @@ -33,8 +31,8 @@ public: } } - template <typename Shader, typename VertexBuffer, typename ElementsBuffer> - void bind(Shader& shader, VertexBuffer &vertexBuffer, ElementsBuffer &elementsBuffer, GLbyte *offset, gl::ObjectStore& store) { + template <typename VertexBuffer, typename ElementsBuffer> + void bind(Shader& shader, VertexBuffer& vertexBuffer, ElementsBuffer& elementsBuffer, GLbyte* offset, gl::ObjectStore& store) { bindVertexArrayObject(store); if (bound_shader == 0) { vertexBuffer.bind(store); @@ -62,7 +60,7 @@ private: // For debug reasons, we're storing the bind information so that we can // detect errors and report GLuint bound_shader = 0; - const char *bound_shader_name = ""; + const char* bound_shader_name = ""; GLuint bound_vertex_buffer = 0; GLuint bound_elements_buffer = 0; GLbyte *bound_offset = nullptr; |