diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-09-11 15:08:54 +0300 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-09-15 13:22:07 +0200 |
commit | a3ea4acb7cb4d57ca2f5808b9b600d7c1b7b3cc7 (patch) | |
tree | d39c60300f32df4644a3cf3ad705fa9b1e0a1337 /src/mbgl/renderer/fill_bucket.cpp | |
parent | c33a6bddc66efd18159b111796cce65ad78950f2 (diff) | |
download | qtlocation-mapboxgl-a3ea4acb7cb4d57ca2f5808b9b600d7c1b7b3cc7.tar.gz |
[core] convert remaining types to use OpenGL header defined variants
Diffstat (limited to 'src/mbgl/renderer/fill_bucket.cpp')
-rw-r--r-- | src/mbgl/renderer/fill_bucket.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/renderer/fill_bucket.cpp b/src/mbgl/renderer/fill_bucket.cpp index 7fb25d9a80..38263b3a47 100644 --- a/src/mbgl/renderer/fill_bucket.cpp +++ b/src/mbgl/renderer/fill_bucket.cpp @@ -91,7 +91,7 @@ void FillBucket::tessellate() { return; } - size_t total_vertex_count = 0; + GLsizei total_vertex_count = 0; for (const auto& polygon : polygons) { total_vertex_count += polygon.size(); } @@ -110,7 +110,7 @@ void FillBucket::tessellate() { GLsizei lineIndex = lineGroup.vertex_length; for (const auto& polygon : polygons) { - const size_t group_count = polygon.size(); + const GLsizei group_count = static_cast<GLsizei>(polygon.size()); assert(group_count >= 3); std::vector<TESSreal> clipped_line; @@ -120,8 +120,8 @@ void FillBucket::tessellate() { vertexBuffer.add(pt.X, pt.Y); } - for (size_t i = 0; i < group_count; i++) { - const size_t prev_i = (i == 0 ? group_count : i) - 1; + for (GLsizei i = 0; i < group_count; i++) { + const GLsizei prev_i = (i == 0 ? group_count : i) - 1; lineElementsBuffer.add(lineIndex + prev_i, lineIndex + i); } @@ -134,12 +134,12 @@ void FillBucket::tessellate() { if (tessTesselate(tesselator, TESS_WINDING_ODD, TESS_POLYGONS, vertices_per_group, vertexSize, 0)) { const TESSreal *vertices = tessGetVertices(tesselator); - const size_t vertex_count = tessGetVertexCount(tesselator); + const GLsizei vertex_count = tessGetVertexCount(tesselator); TESSindex *vertex_indices = const_cast<TESSindex *>(tessGetVertexIndices(tesselator)); const TESSindex *elements = tessGetElements(tesselator); const int triangle_count = tessGetElementCount(tesselator); - for (size_t i = 0; i < vertex_count; ++i) { + for (GLsizei i = 0; i < vertex_count; ++i) { if (vertex_indices[i] == TESS_UNDEF) { vertexBuffer.add(::round(vertices[i * 2]), ::round(vertices[i * 2 + 1])); vertex_indices[i] = (TESSindex)total_vertex_count; |