void Texture::LoadFromBuffer(char *buffer, unsigned int bufferLength)
{
    FileManager *fm = FileManager::CreateManager();
    GLubyte *textureData = fm->CreateBitmapData(buffer, bufferLength, &_texWidth, &_texHeight);
    
    _name = SetupTexture(textureData);
    _disposed = false;
}
Texture::Texture(string filename)
{
    
    FileManager *fm = FileManager::CreateManager();
    GLubyte *textureData = fm->CreateBitmapData(filename, &_texWidth, &_texHeight);
    
    _name = SetupTexture(textureData);
    _textureFilename = filename;
    _fromFile = true;
}