summaryrefslogtreecommitdiffhomepage
path: root/draw
diff options
context:
space:
mode:
Diffstat (limited to 'draw')
-rw-r--r--draw/anim.cpp2
-rw-r--r--draw/floor.cpp2
-rw-r--r--draw/wall.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/draw/anim.cpp b/draw/anim.cpp
index 02421ddb..5f52f680 100644
--- a/draw/anim.cpp
+++ b/draw/anim.cpp
@@ -78,7 +78,7 @@ void anim_mesh::draw(tile_shader& shader, const Vector2i& win_size, chunk& c, st
fm_assert(i < size);
GL::MeshView mesh{mesh_};
mesh.setCount((int)(quad_index_count * 1));
- mesh.setIndexRange((int)(x.mesh_idx*quad_index_count), 0, max_index);
+ mesh.setIndexOffset((int)(x.mesh_idx*quad_index_count), 0, max_index);
shader.draw(atlas.texture(), mesh);
i++;
}
diff --git a/draw/floor.cpp b/draw/floor.cpp
index 8e92c966..8736eea8 100644
--- a/draw/floor.cpp
+++ b/draw/floor.cpp
@@ -26,7 +26,7 @@ void floor_mesh::draw(tile_shader& shader, chunk& c)
if (auto len = i - last.pos; last.atlas && len > 0)
{
mesh.setCount((int)(quad_index_count * len));
- mesh.setIndexRange((int)(last.pos*quad_index_count), 0, max_index);
+ mesh.setIndexOffset((int)(last.pos*quad_index_count), 0, max_index);
shader.draw(last.atlas->texture(), mesh);
draw_count++;
}
diff --git a/draw/wall.cpp b/draw/wall.cpp
index f6f06c4c..81cd7903 100644
--- a/draw/wall.cpp
+++ b/draw/wall.cpp
@@ -27,7 +27,7 @@ void wall_mesh::draw(tile_shader& shader, chunk& c)
if (auto len = i - last.pos; last.atlas && len > 0)
{
mesh.setCount((int)(quad_index_count * len));
- mesh.setIndexRange((int)(last.pos*quad_index_count), 0, max_index);
+ mesh.setIndexOffset((int)(last.pos*quad_index_count), 0, max_index);
shader.draw(last.atlas->texture(), mesh);
draw_count++;
}