Don't call glGenTextures every time the texture atlas updates

This commit is contained in:
Dan Paulat 2023-09-10 21:44:19 -05:00
parent d78e650368
commit 555fbf479a
3 changed files with 25 additions and 13 deletions

View file

@ -72,10 +72,10 @@ public:
std::uint64_t BuildCount() const;
void RegisterTexture(const std::string& name, const std::string& path);
bool CacheTexture(const std::string& name, const std::string& path);
void BuildAtlas(std::size_t width, std::size_t height);
GLuint BufferAtlas(gl::OpenGLFunctions& gl);
void RegisterTexture(const std::string& name, const std::string& path);
bool CacheTexture(const std::string& name, const std::string& path);
void BuildAtlas(std::size_t width, std::size_t height);
void BufferAtlas(gl::OpenGLFunctions& gl, GLuint texture);
TextureAttributes GetTextureAttributes(const std::string& name);