diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-26 12:53:32 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-10-05 10:52:19 -0700 |
commit | 7a3bef091e7390fa57bf33f1a704c893768b5625 (patch) | |
tree | af798d879923fd45e763f5dc5449b7e8419aa192 /src/mbgl/renderer/painter.hpp | |
parent | ac8a74ebccb85f83c40b9fccfeb11dc2cb3c79e4 (diff) | |
download | qtlocation-mapboxgl-7a3bef091e7390fa57bf33f1a704c893768b5625.tar.gz |
[core] Refactor Buffer
Diffstat (limited to 'src/mbgl/renderer/painter.hpp')
-rw-r--r-- | src/mbgl/renderer/painter.hpp | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp index 2159881ffd..55f5c654b9 100644 --- a/src/mbgl/renderer/painter.hpp +++ b/src/mbgl/renderer/painter.hpp @@ -8,10 +8,10 @@ #include <mbgl/renderer/render_item.hpp> #include <mbgl/renderer/bucket.hpp> -#include <mbgl/geometry/vao.hpp> -#include <mbgl/geometry/static_vertex_buffer.hpp> - +#include <mbgl/gl/vao.hpp> #include <mbgl/gl/context.hpp> +#include <mbgl/shader/plain_vertex.hpp> +#include <mbgl/shader/raster_vertex.hpp> #include <mbgl/style/style.hpp> @@ -188,34 +188,9 @@ private: std::unique_ptr<Shaders> overdrawShaders; #endif - // Set up the stencil quad we're using to generate the stencil mask. - StaticVertexBuffer tileStencilBuffer { - // top left triangle - {{ 0, 0 }}, - {{ util::EXTENT, 0 }}, - {{ 0, util::EXTENT }}, - - // bottom right triangle - {{ util::EXTENT, 0 }}, - {{ 0, util::EXTENT }}, - {{ util::EXTENT, util::EXTENT }}, - }; - - StaticRasterVertexBuffer rasterBoundsBuffer { - {{ 0, 0, 0, 0 }}, - {{ util::EXTENT, 0, 32767, 0 }}, - {{ 0, util::EXTENT, 0, 32767 }}, - {{ util::EXTENT, util::EXTENT, 32767, 32767 }}, - }; - - // Set up the tile boundary lines we're using to draw the tile outlines. - StaticVertexBuffer tileBorderBuffer { - {{ 0, 0 }}, - {{ util::EXTENT, 0 }}, - {{ util::EXTENT, util::EXTENT }}, - {{ 0, util::EXTENT }}, - {{ 0, 0 }}, - }; + gl::VertexBuffer<PlainVertex> tileTriangleVertexes; + gl::VertexBuffer<PlainVertex> tileLineStripVertexes; + gl::VertexBuffer<RasterVertex> rasterVertexes; VertexArrayObject tileBorderArray; }; |