1
General / SFML2: Bundling for linux release
« on: September 26, 2010, 12:51:36 am »
You could use cmake to create static libraries and link against those.
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.
This part of the code is very critical, and even a slight modification has a huge impact on performances. And in this case, using a fixed-size array is faster than using a dynamic one.
#include <SFML/Graphics.hpp>
#include <iostream>
class TestDrawable : public sf::Drawable
{
public:
TestDrawable(int id) : mId(id)
{
}
void Render(sf::RenderTarget& target, sf::RenderQueue& queue) const
{
std::cout << mId << std::endl;
if (mId < 15)
{
TestDrawable nestedDrawable(mId + 1);
target.Draw(nestedDrawable);
}
}
private:
int mId;
};
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600, 32), "SFML Window");
TestDrawable test(0);
window.Draw(test);
window.Display();
}
App.SetIcon( img_icon.GetWidth(), img_icon.GetHeight(), img_icon.GetPixelsPtr());
I've uploaded the code hier:
http://sfml15-seticont.sourceforge.net
IntRectangle Rectangle;
Recti Rectangle;
Rectanglei Rectangle;
textToDisplay.GetCenter()