SFML community forums
Bindings - other languages => DotNet => Topic started by: sofakng on January 14, 2009, 09:30:54 pm
-
I'm reading over the documentation for SFML and it mentions the Font class having methods such as GetImage (and other methods for Glyphs).
How come these don't exist in the .NET port?
I was hoping to render a character (or string) to an image/sprite and it looks like I need these functions...
-
Well, those methods are not really needed. They were added mainly for a cleaner integration of the Font class within SFML.
You'll be able to render text to an image with the render-to-image feature that's going to be added soon.
-
Sounds good. I look forward to the updates!
By the way, will this render-to-image allow games like Worms or Scorched earth? They usually require modifying a bitmap/image every frame to simulate terrain destruction, etc.
However, I'm not sure how fast this will be since modifying textures in video memory is supposedly a very expensive operation.
-
By the way, will this render-to-image allow games like Worms or Scorched earth? They usually require modifying a bitmap/image every frame to simulate terrain destruction, etc.
I don't think so, those effects usually require manual modification of the pixels. Render-to-image will be nothing more than normal drawing, but to an image rather than to a window.
However, I'm not sure how fast this will be since modifying textures in video memory is supposedly a very expensive operation.
It will highly depend on the GPU, and of the usage of this neaw feature. I'm sure people will do crazy things involving multiple transfers between system and video memory, and then wonder why it's so slow ;)
But if you use it wisely, it will be very fast.
-
Render-to-image will be nothing more than normal drawing, but to an image rather than to a window.
This is exactly what I need to be able to continue, any idea when it will be ready? I have a lot of graphics to draw for my game so I guess I can do that while waiting so no hurry.
-
I've worked hard on this feature for the last two days, and it's almost complete now. It should be ready very soon.
I'm just curious, what do you need it for? :)
-
I've worked hard on this feature for the last two days, and it's almost complete now. It should be ready very soon.
I'm just curious, what do you need it for? :)
Render a sf::String to an image.