Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Musi

Pages: [1]
1
Graphics / Re: Sprite apears as a white box.
« on: June 23, 2013, 01:44:34 pm »
Ah thank you

2
Graphics / Sprite apears as a white box.
« on: June 23, 2013, 01:31:04 pm »
I've loaded a sprite from a file but for some reason when i draw it, it just appears as a white box the same size as the image. I load an image first so i can add an alpha mask, then load the texture, then the sprite.

    sf::Image image;
        image.loadFromFile("Sprites/cursorArrow.png");
        image.createMaskFromColor( sf::Color( 255,0,255 ) );

        sf::Texture texture;
        texture.loadFromImage( image );

        m_spriteArrow.setTexture( texture );
        m_spriteArrow.setPosition( 100.0, 100.0 );

Pages: [1]