From 1ec8e253172112e0f2bb98426c8d0ad900addfe7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 20 Oct 2022 15:23:50 +0200 Subject: a --- draw/floor-mesh.cpp | 2 +- draw/wall-mesh.cpp | 2 +- draw/wireframe-mesh.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'draw') diff --git a/draw/floor-mesh.cpp b/draw/floor-mesh.cpp index 3b253966..7fef5109 100644 --- a/draw/floor-mesh.cpp +++ b/draw/floor-mesh.cpp @@ -32,7 +32,7 @@ void floor_mesh::set_tile(quad_data& data, tile& x) void floor_mesh::draw(tile_shader& shader, chunk& c) { - _vertex_buffer.setData({nullptr, sizeof(quad_data) * TILE_COUNT}, Magnum::GL::BufferUsage::DynamicDraw); // orphan the buffer + //_vertex_buffer.setData({nullptr, sizeof(quad_data) * TILE_COUNT}, Magnum::GL::BufferUsage::DynamicDraw); // orphan the buffer std::array data; for (auto& [x, idx, pt] : c) { set_tile(data[idx], x); diff --git a/draw/wall-mesh.cpp b/draw/wall-mesh.cpp index c15be873..dfbb739e 100644 --- a/draw/wall-mesh.cpp +++ b/draw/wall-mesh.cpp @@ -39,7 +39,7 @@ void wall_mesh::maybe_add_tile(vertex_array& data, texture_array& textures, tile void wall_mesh::draw(tile_shader& shader, chunk& c) { - _vertex_buffer.setData({nullptr, sizeof(vertex_array)}, Magnum::GL::BufferUsage::DynamicDraw); // orphan the buffer + //_vertex_buffer.setData({nullptr, sizeof(vertex_array)}, Magnum::GL::BufferUsage::DynamicDraw); // orphan the buffer texture_array textures = {}; { vertex_array data; diff --git a/draw/wireframe-mesh.hpp b/draw/wireframe-mesh.hpp index 40471f8d..67b35ecd 100644 --- a/draw/wireframe-mesh.hpp +++ b/draw/wireframe-mesh.hpp @@ -55,7 +55,7 @@ wireframe_mesh::wireframe_mesh() : template void wireframe_mesh::draw(tile_shader& shader, T x) { - _vertex_buffer.setData({nullptr, sizeof(Vector3) * T::num_vertices}, GL::BufferUsage::DynamicDraw); // orphan the buffer + //_vertex_buffer.setData({nullptr, sizeof(Vector3) * T::num_vertices}, GL::BufferUsage::DynamicDraw); // orphan the buffer _vertex_buffer.setSubData(0, x.make_vertex_array()); x.on_draw(); mesh_base::draw(shader); -- cgit v1.2.3