refactor Brush to be used in shared_ptr
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "log.h"
|
||||
#include "texture.h"
|
||||
#include "util.h"
|
||||
#include "app.h"
|
||||
|
||||
std::map<uint16_t, Texture2D> TextureManager::m_textures;
|
||||
|
||||
@@ -107,6 +108,17 @@ glm::vec2 Texture2D::size() const
|
||||
return { m_width, m_height };
|
||||
}
|
||||
|
||||
Texture2D::~Texture2D()
|
||||
{
|
||||
if (auto_destroy)
|
||||
{
|
||||
LOG("Texture2D auto destroy");
|
||||
App::I.async_start();
|
||||
destroy();
|
||||
App::I.async_end();
|
||||
}
|
||||
}
|
||||
|
||||
bool Sampler::create(GLint filter /*= GL_LINEAR*/, GLint wrap /*= GL_CLAMP_TO_EDGE*/)
|
||||
{
|
||||
#if USE_SAMPLER
|
||||
|
||||
Reference in New Issue
Block a user