class TextureResourceHandler¶
This class is a workaround to crashes and memory leaks caused by not reserving and freeing opengl textures from the same thread.
class TextureResourceHandler { public: // methods static TextureResourceHandler& Instance(); std::pair<unsigned int, unsigned int> generateTextureID(); void releaseTextureID( unsigned int texName, unsigned int texUnit ); };
Methods¶
std::pair<unsigned int, unsigned int> generateTextureID()
Return [textureName, textureUnit].