SFML community forums
Help => Graphics => Topic started by: aisman on April 16, 2008, 10:55:04 am
-
I want to draw my own sprites.
Can I draw a shape to a sprite for this?
-
Can you give more details ? What does "my own sprites" mean ? What does "draw a shape to a sprite" means ? Are you talking about render-to-image ?
-
See this pseudo code, hope you understand me now
sf::Sprite mySprite(...);
sf::Shape myShape = sf::Shape::Circle(...);
mySprite.Draw(myShape)
while (App.IsOpened())
{
...
App.Draw(mySprite);
// Display things on screen
App.Display();
}
-
Ok, so you'll have to wait for the render-to-image feature, which should be done in the next version (hopefully) :)
However, I don't know if it's just for the example, but if you just want to pre-render one shape if may be not worth it.
-
1) Ok, so you'll have to wait for the render-to-image feature, which should be done in the next version (hopefully) :)
2) However, I don't know if it's just for the example, but if you just want to pre-render one shape if may be not worth it.
1) Fine. Currently not in the SVN?
2) You are right. It is a bad example.
The render-to-image feature has the same feature as the render-to-window has, right?
- Render string to an image
- Render image to an image
- Render shape to an image
- etc...
-
1) Fine. Currently not in the SVN?
No, I haven't started working on it yet.
The render-to-image feature has the same feature as the render-to-window has, right?
Yep, should be exactly the same interface, just the target of the rendering will change (an image instead of a window).