diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-03-01 12:06:29 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-06 16:12:51 +0100 |
commit | d5816b6db265b36cf1360dc684725b0f7427d959 (patch) | |
tree | 5f965fec52994011b0c36afdce284a0985a19ec6 | |
parent | 63e81b9aa8ad1a96e47a296db57e33c866315bee (diff) | |
download | qtlocation-mapboxgl-d5816b6db265b36cf1360dc684725b0f7427d959.tar.gz |
[core] remove unused template parameter from gl::IndexBuffer
-rw-r--r-- | src/mbgl/gl/context.hpp | 6 | ||||
-rw-r--r-- | src/mbgl/gl/index_buffer.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/gl/program.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/programs/collision_box_program.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/programs/program.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/programs/symbol_program.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/circle_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/debug_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/fill_bucket.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/heatmap_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/hillshade_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/line_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/raster_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/symbol_bucket.hpp | 8 | ||||
-rw-r--r-- | src/mbgl/renderer/render_static_data.hpp | 4 |
16 files changed, 23 insertions, 24 deletions
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp index f9b075406b..85e35d4d70 100644 --- a/src/mbgl/gl/context.hpp +++ b/src/mbgl/gl/context.hpp @@ -80,15 +80,15 @@ public: } template <class DrawMode> - IndexBuffer<DrawMode> createIndexBuffer(gfx::IndexVector<DrawMode>&& v, const BufferUsage usage = BufferUsage::StaticDraw) { - return IndexBuffer<DrawMode> { + IndexBuffer createIndexBuffer(gfx::IndexVector<DrawMode>&& v, const BufferUsage usage = BufferUsage::StaticDraw) { + return IndexBuffer { v.indexSize(), createIndexBuffer(v.data(), v.byteSize(), usage) }; } template <class DrawMode> - void updateIndexBuffer(IndexBuffer<DrawMode>& buffer, gfx::IndexVector<DrawMode>&& v) { + void updateIndexBuffer(IndexBuffer& buffer, gfx::IndexVector<DrawMode>&& v) { assert(v.indexSize() == buffer.indexCount); updateIndexBuffer(buffer.buffer, v.data(), v.byteSize()); } diff --git a/src/mbgl/gl/index_buffer.hpp b/src/mbgl/gl/index_buffer.hpp index bf20932451..a506c5eacd 100644 --- a/src/mbgl/gl/index_buffer.hpp +++ b/src/mbgl/gl/index_buffer.hpp @@ -5,7 +5,6 @@ namespace mbgl { namespace gl { -template <class DrawMode> class IndexBuffer { public: std::size_t indexCount; diff --git a/src/mbgl/gl/program.hpp b/src/mbgl/gl/program.hpp index 7e98a63b8d..45aaa3eebb 100644 --- a/src/mbgl/gl/program.hpp +++ b/src/mbgl/gl/program.hpp @@ -122,7 +122,7 @@ public: const UniformValues& uniformValues, VertexArray& vertexArray, const AttributeBindings& attributeBindings, - const IndexBuffer<DrawMode>& indexBuffer, + const IndexBuffer& indexBuffer, std::size_t indexOffset, std::size_t indexLength) { static_assert(std::is_same<Primitive, typename DrawMode::Primitive>::value, "incompatible draw mode"); diff --git a/src/mbgl/programs/collision_box_program.hpp b/src/mbgl/programs/collision_box_program.hpp index 08a1645910..b8b5c7e054 100644 --- a/src/mbgl/programs/collision_box_program.hpp +++ b/src/mbgl/programs/collision_box_program.hpp @@ -65,7 +65,7 @@ public: const UniformValues& uniformValues, const gl::VertexBuffer<gfx::Vertex<CollisionBoxLayoutAttributes>>& layoutVertexBuffer, const gl::VertexBuffer<gfx::Vertex<CollisionBoxDynamicAttributes>>& dynamicVertexBuffer, - const gl::IndexBuffer<DrawMode>& indexBuffer, + const gl::IndexBuffer& indexBuffer, const SegmentVector<Attributes>& segments, const Binders& paintPropertyBinders, const typename PaintProperties::PossiblyEvaluated& currentProperties, @@ -146,7 +146,7 @@ public: const UniformValues& uniformValues, const gl::VertexBuffer<gfx::Vertex<CollisionBoxLayoutAttributes>>& layoutVertexBuffer, const gl::VertexBuffer<gfx::Vertex<CollisionBoxDynamicAttributes>>& dynamicVertexBuffer, - const gl::IndexBuffer<DrawMode>& indexBuffer, + const gl::IndexBuffer& indexBuffer, const SegmentVector<Attributes>& segments, const Binders& paintPropertyBinders, const typename PaintProperties::PossiblyEvaluated& currentProperties, diff --git a/src/mbgl/programs/program.hpp b/src/mbgl/programs/program.hpp index b683944607..29d6dd1735 100644 --- a/src/mbgl/programs/program.hpp +++ b/src/mbgl/programs/program.hpp @@ -75,7 +75,7 @@ public: gfx::StencilMode stencilMode, gfx::ColorMode colorMode, gfx::CullFaceMode cullFaceMode, - const gl::IndexBuffer<DrawMode>& indexBuffer, + const gl::IndexBuffer& indexBuffer, const SegmentVector<Attributes>& segments, const typename AllUniforms::Values& allUniformValues, const typename Attributes::Bindings& allAttributeBindings, diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp index 02af9df150..2eb1c0b4cd 100644 --- a/src/mbgl/programs/symbol_program.hpp +++ b/src/mbgl/programs/symbol_program.hpp @@ -310,7 +310,7 @@ public: gfx::StencilMode stencilMode, gfx::ColorMode colorMode, gfx::CullFaceMode cullFaceMode, - const gl::IndexBuffer<DrawMode>& indexBuffer, + const gl::IndexBuffer& indexBuffer, const SegmentVector<Attributes>& segments, const typename AllUniforms::Values& allUniformValues, const typename Attributes::Bindings& allAttributeBindings, diff --git a/src/mbgl/renderer/buckets/circle_bucket.hpp b/src/mbgl/renderer/buckets/circle_bucket.hpp index b823c3ec97..6e0011a4cd 100644 --- a/src/mbgl/renderer/buckets/circle_bucket.hpp +++ b/src/mbgl/renderer/buckets/circle_bucket.hpp @@ -35,7 +35,7 @@ public: SegmentVector<CircleAttributes> segments; optional<gl::VertexBuffer<CircleLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; std::map<std::string, CircleProgram::Binders> paintPropertyBinders; diff --git a/src/mbgl/renderer/buckets/debug_bucket.hpp b/src/mbgl/renderer/buckets/debug_bucket.hpp index abb47ea211..92d575a3cd 100644 --- a/src/mbgl/renderer/buckets/debug_bucket.hpp +++ b/src/mbgl/renderer/buckets/debug_bucket.hpp @@ -35,7 +35,7 @@ public: SegmentVector<DebugAttributes> segments; optional<gl::VertexBuffer<DebugLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Lines>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; }; } // namespace mbgl diff --git a/src/mbgl/renderer/buckets/fill_bucket.hpp b/src/mbgl/renderer/buckets/fill_bucket.hpp index d205ca801f..41c3e2004f 100644 --- a/src/mbgl/renderer/buckets/fill_bucket.hpp +++ b/src/mbgl/renderer/buckets/fill_bucket.hpp @@ -47,8 +47,8 @@ public: SegmentVector<FillAttributes> triangleSegments; optional<gl::VertexBuffer<FillLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Lines>> lineIndexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> triangleIndexBuffer; + optional<gl::IndexBuffer> lineIndexBuffer; + optional<gl::IndexBuffer> triangleIndexBuffer; std::map<std::string, FillProgram::Binders> paintPropertyBinders; }; diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp index 7ff6b5e84d..c3ea537de5 100644 --- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp +++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp @@ -44,7 +44,7 @@ public: SegmentVector<FillExtrusionAttributes> triangleSegments; optional<gl::VertexBuffer<FillExtrusionLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; std::unordered_map<std::string, FillExtrusionProgram::Binders> paintPropertyBinders; }; diff --git a/src/mbgl/renderer/buckets/heatmap_bucket.hpp b/src/mbgl/renderer/buckets/heatmap_bucket.hpp index 437a6f6473..da60904f22 100644 --- a/src/mbgl/renderer/buckets/heatmap_bucket.hpp +++ b/src/mbgl/renderer/buckets/heatmap_bucket.hpp @@ -34,7 +34,7 @@ public: SegmentVector<HeatmapAttributes> segments; optional<gl::VertexBuffer<HeatmapLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; std::map<std::string, HeatmapProgram::Binders> paintPropertyBinders; diff --git a/src/mbgl/renderer/buckets/hillshade_bucket.hpp b/src/mbgl/renderer/buckets/hillshade_bucket.hpp index 54c16dcbd6..f3c13a4c63 100644 --- a/src/mbgl/renderer/buckets/hillshade_bucket.hpp +++ b/src/mbgl/renderer/buckets/hillshade_bucket.hpp @@ -51,7 +51,7 @@ public: SegmentVector<HillshadeAttributes> segments; optional<gl::VertexBuffer<HillshadeLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; private: DEMData demdata; bool prepared = false; diff --git a/src/mbgl/renderer/buckets/line_bucket.hpp b/src/mbgl/renderer/buckets/line_bucket.hpp index 702f55d66a..4f46385a27 100644 --- a/src/mbgl/renderer/buckets/line_bucket.hpp +++ b/src/mbgl/renderer/buckets/line_bucket.hpp @@ -48,7 +48,7 @@ public: SegmentVector<LineAttributes> segments; optional<gl::VertexBuffer<LineLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; std::map<std::string, LineProgram::Binders> paintPropertyBinders; diff --git a/src/mbgl/renderer/buckets/raster_bucket.hpp b/src/mbgl/renderer/buckets/raster_bucket.hpp index d610548411..3608f91626 100644 --- a/src/mbgl/renderer/buckets/raster_bucket.hpp +++ b/src/mbgl/renderer/buckets/raster_bucket.hpp @@ -37,7 +37,7 @@ public: SegmentVector<RasterAttributes> segments; optional<gl::VertexBuffer<RasterLayoutVertex>> vertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; }; } // namespace mbgl diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp index 2ebeb99062..2d58a7ce0f 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.hpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp @@ -98,7 +98,7 @@ public: optional<gl::VertexBuffer<SymbolLayoutVertex>> vertexBuffer; optional<gl::VertexBuffer<gfx::Vertex<SymbolDynamicLayoutAttributes>>> dynamicVertexBuffer; optional<gl::VertexBuffer<gfx::Vertex<SymbolOpacityAttributes>>> opacityVertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; } text; std::unique_ptr<SymbolSizeBinder> iconSizeBinder; @@ -115,7 +115,7 @@ public: optional<gl::VertexBuffer<SymbolLayoutVertex>> vertexBuffer; optional<gl::VertexBuffer<gfx::Vertex<SymbolDynamicLayoutAttributes>>> dynamicVertexBuffer; optional<gl::VertexBuffer<gfx::Vertex<SymbolOpacityAttributes>>> opacityVertexBuffer; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; } icon; struct CollisionBuffer { @@ -129,12 +129,12 @@ public: struct CollisionBoxBuffer : public CollisionBuffer { gfx::IndexVector<gfx::Lines> lines; - optional<gl::IndexBuffer<gfx::Lines>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; } collisionBox; struct CollisionCircleBuffer : public CollisionBuffer { gfx::IndexVector<gfx::Triangles> triangles; - optional<gl::IndexBuffer<gfx::Triangles>> indexBuffer; + optional<gl::IndexBuffer> indexBuffer; } collisionCircle; uint32_t bucketInstanceId = 0; diff --git a/src/mbgl/renderer/render_static_data.hpp b/src/mbgl/renderer/render_static_data.hpp index e578e2af0a..73e92c85b9 100644 --- a/src/mbgl/renderer/render_static_data.hpp +++ b/src/mbgl/renderer/render_static_data.hpp @@ -20,8 +20,8 @@ public: gl::VertexBuffer<RasterLayoutVertex> rasterVertexBuffer; gl::VertexBuffer<ExtrusionTextureLayoutVertex> extrusionTextureVertexBuffer; - gl::IndexBuffer<gfx::Triangles> quadTriangleIndexBuffer; - gl::IndexBuffer<gfx::LineStrip> tileBorderIndexBuffer; + gl::IndexBuffer quadTriangleIndexBuffer; + gl::IndexBuffer tileBorderIndexBuffer; SegmentVector<BackgroundAttributes> tileTriangleSegments; SegmentVector<DebugAttributes> tileBorderSegments; |