1
General / Statically Linking Issues [not quite resolved]
« on: May 31, 2010, 09:21:49 pm »
Oh, uhm, yeah. I kind of hijacked his thread. :oops:
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.
#include <SFML/Graphics.hpp>
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
sf::Image etc;
etc.LoadFromFile("image.png");
etc.SetSmooth(true);
sf::Sprite spr;
spr.SetImage(etc);
spr.SetPosition(0, 0);
sf::RenderImage rim;
rim.Create(800, 600, 0);
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
// Window closed
if (Event.Type == sf::Event::Closed)
App.Close();
// Escape key pressed
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();
}
App.Clear(sf::Color::Blue);
rim.Clear(sf::Color::White);
rim.Draw(spr);
sf::Sprite rimspr;
rimspr.SetImage(rim.GetImage());
App.Draw(rimspr);
App.Display();
}
return EXIT_SUCCESS;
}