diff --git a/include/blt/gfx/model.h b/include/blt/gfx/model.h index 79383bb..82dcbfd 100644 --- a/include/blt/gfx/model.h +++ b/include/blt/gfx/model.h @@ -156,6 +156,7 @@ namespace blt::gfx * @return a shared pointer to the stored vbo. used for chaining VAOs with multiple shared VBOs */ static_dynamic_array::vbo_type bindVBO(const vbo_t& vbo, int attribute_number, int coordinate_size, GLenum type, int stride, long offset); + // same as the other bind method except you provide the shared reference. void bindVBO(const static_dynamic_array::vbo_type& vbo, int attribute_number, int coordinate_size, GLenum type, int stride, long offset); inline void bindElement(const vbo_t& vbo) diff --git a/include/blt/gfx/renderer/resource_manager.h b/include/blt/gfx/renderer/resource_manager.h index d1273b6..3bbeb05 100644 --- a/include/blt/gfx/renderer/resource_manager.h +++ b/include/blt/gfx/renderer/resource_manager.h @@ -63,6 +63,15 @@ namespace blt::gfx return textures_2d[name]; } + /** + * Directly sets the internal representation of the texture. Can be used to set custom, non file system loaded textures. + * Note: this function takes ownership of the ptr. + */ + inline void set(std::string_view name, texture_gl2D* texture) + { + textures_2d[name] = texture; + } + void cleanup(); };