Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
Texture::Texture(string filename)
{
    
    FileManager *fm = FileManager::CreateManager();
    GLubyte *textureData = fm->CreateBitmapData(filename, &_texWidth, &_texHeight);
    
    _name = SetupTexture(textureData);
    _textureFilename = filename;
    _fromFile = true;
}