allow for direct setting of the texture_2d
parent
2f9bccc348
commit
00649a055d
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue