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 - matt2224

Pages: [1]
1
Graphics / Sprite won't draw correctly
« on: May 29, 2010, 01:23:30 am »
It works fine.

2
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 09:17:02 pm »
Most of them don't but I think that's because of App.Clear() crashing them.

3
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 08:53:23 pm »
Nope. :( I've already tried a multitude of images.

4
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 08:44:50 pm »
Yes. The other tutorial with the 3D rotating cube worked fine.

5
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 07:16:59 pm »
Any ideas Laurent?

6
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 04:57:45 pm »
It's version 1.5

7
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 01:50:34 pm »
Basically, I have this huge box in the corner with a green-light green gradient. I though it was the sprite but massively upscaled, but if I try to scale it down again it disappears completely.

OS: Ubuntu 10.04
IDE: Qt Creator, but even when I compile manually it doesn't work

How do I find out my SFML version?

8
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 12:05:35 pm »
I'm using the OpenGl functions because App.Clear() crashes the program (other people have mentioned this in here before).

The image is loaded correctly, I've just tried checking the return. I'll try and upload the image at a different host if it helps.

Here:


9
Graphics / Sprite won't draw correctly
« on: May 28, 2010, 11:43:05 am »
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML 2D");
    sf::Image image;
    sf::Sprite sprite;

    image.LoadFromFile("tree.tga");
    sprite.SetImage(image);

    while (App.IsOpened())
    {
        // Event handling
        sf::Event event;
        while (App.GetEvent(event))
        {
            if (event.Type == sf::Event::Closed)
                App.Close();
        }

        glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
        glClear(GL_COLOR_BUFFER_BIT);
       
        App.Draw(sprite);
        App.Display();
    }

    return 0;
}


Tree.tga:


Output:


Why won't it work?

Pages: [1]
anything