1
SFML projects / Re: Updator (2013/05/11 : new version 0.3)
« on: May 11, 2013, 03:58:24 pm »
Good to hear updates from the Updator
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.
I looked at the smiley sets available on the SMF website, but none of them was looking goodWell you can add your own smileys (read "pick old forum smiley and put them here").
It's a keyword.
I admit that omitting is/get can lead to ambiguity because in english, a verb and its corresponding noun can be identical. But that's not a big issue to me, once you know what the function does, or if you read the doc / tutorials before coding, everything should be ok.
#include <SFML/Graphics.hpp>
int main(){
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
sf::RenderTexture texture;
if (!texture.Create(300, 300)) return EXIT_FAILURE;
sf::CircleShape circle(100);
circle.SetFillColor(sf::Color::Green);
texture.Clear(sf::Color::Blue);
texture.Draw(circle);
texture.Display();
sf::Event event;
while (window.IsOpened()){
while (window.PollEvent(event)){
if (event.Type == sf::Event::Closed){
window.Close();
}
}
window.Clear();
sf::Sprite sprite(texture.GetTexture());
window.Draw(sprite);
//window.Draw(circle);
window.Display();
}
return EXIT_SUCCESS;
}
sf::RenderTexture texture;
if (!texture.Create(300, 300)) return -1;
sf::CircleShape circle(100);
circle.SetFillColor(sf::Color::Green);
texture.Clear(sf::Color::Blue);
texture.Draw(circle);
texture.Display(); // display the drawn circle
while (window.IsOpened()){
window.Clear();
sf::Sprite sprite(texture.GetTexture());
window.Draw(sprite);
window.Display();
}
What if my loop lasted shorter than 1 ms (0.9 ms), would it be truncated to 0 ms?