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

Pages: [1]
1
Graphics / Shapes
« on: March 30, 2008, 07:49:32 am »
Ohh, that makes sense. Thanks!

2
Graphics / Shapes
« on: March 29, 2008, 10:33:00 pm »
So, I'm trying to use the new Shape class in the latest sfml svn, but I don't seem to be able to get anything to show up. Here's the test code I'm using to try to get it working. What am I doing wrong here?

Code: [Select]

#include <SFML/Graphics.hpp>
int main()
{
        // Create the main rendering window
        sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
        // Create line
        sf::Shape beam;
        beam.Line(65.f, 68.f, 400.f, 400.f, 20.f, sf::Color(255, 0, 255));
        // Start loop
        bool Running = true;
        while (Running)
        {
                // Process events
                sf::Event Event;
                while (App.GetEvent(Event))
                {
                        // Close window : exit
                        if (Event.Type == sf::Event::Closed)
                                Running = false;
                }
                App.Draw(beam);
                // Display window contents on screen
                App.Display();
        }
        return EXIT_SUCCESS;
}

Pages: [1]