SFML community forums
Bindings - other languages => DotNet => Topic started by: Vbitz on February 15, 2011, 07:52:11 am
-
Is there any way I can draw a image with creating a new sprite?
Something like RenderWindow.Draw(Image img, float x, float y, float scalex, float scaley)
-
Sprites are made for this. Why don't you want to use them?
-
Sprites are made for this. Why don't you want to use them?
I do not want to use them because the engine I am making is using wrappers to make developing new content faster, a sprite would introduce another dependency to the end developer unless I wrote a wrapper that reimplements most of your functions, I want to keep any engine specific code into one or 2 classes so I can adapt to other renderers with less work.
-
Ok I see. You can create a new sprite every time you want to draw an image, it's fine.
-
Why not using a single sprite and draw it a lot of times? for example, you can use a single sprite, change his properties an draw... change properties and draw, change and draw, etc. You can use an struct that represent the modificated values and have a list of them, iterate that list and set properties and draw foreach element.