diff --git a/CMakeLists.txt b/CMakeLists.txt index c98f5cf..46cc974 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.25) include(FetchContent) -set(BLT_GRAPHICS_VERSION 1.1.6) +set(BLT_GRAPHICS_VERSION 1.1.7) set(BLT_GRAPHICS_TEST_VERSION 0.0.1) project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION}) diff --git a/include/blt/gfx/model.h b/include/blt/gfx/model.h index 9bd30de..2de89af 100644 --- a/include/blt/gfx/model.h +++ b/include/blt/gfx/model.h @@ -61,9 +61,9 @@ namespace blt::gfx allocate(size, mem_type, static_cast(data)); } - void sub_update(GLsizeiptr offset, GLsizeiptr size, void* data) const; + void sub_update(GLsizeiptr offset, GLsizeiptr size, const void* data) const; - void update(GLsizeiptr size, void* data); + void update(GLsizeiptr size, const void* data); void destroy(); }; diff --git a/src/blt/gfx/model.cpp b/src/blt/gfx/model.cpp index d72c93e..f3f9389 100644 --- a/src/blt/gfx/model.cpp +++ b/src/blt/gfx/model.cpp @@ -84,7 +84,7 @@ namespace blt::gfx memory_type = mem_type; } - void vertex_buffer_t::update(GLsizeiptr size, void* data) + void vertex_buffer_t::update(GLsizeiptr size, const void* data) { if (size <= size_) sub_update(0, size, data); @@ -93,7 +93,7 @@ namespace blt::gfx size_ = size; } - void vertex_buffer_t::sub_update(GLsizeiptr offset, GLsizeiptr size, void* data) const + void vertex_buffer_t::sub_update(GLsizeiptr offset, GLsizeiptr size, const void* data) const { bind(); glBufferSubData(buffer_type, offset, size, data);