Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Font.GetImage doesn't exist? Problem with .NET port?  (Read 7891 times)

0 Members and 1 Guest are viewing this topic.

sofakng

  • Newbie
  • *
  • Posts: 18
    • View Profile
Font.GetImage doesn't exist? Problem with .NET port?
« 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...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Font.GetImage doesn't exist? Problem with .NET port?
« Reply #1 on: January 14, 2009, 11:11:54 pm »
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.
Laurent Gomila - SFML developer

sofakng

  • Newbie
  • *
  • Posts: 18
    • View Profile
Font.GetImage doesn't exist? Problem with .NET port?
« Reply #2 on: January 14, 2009, 11:41:00 pm »
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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Font.GetImage doesn't exist? Problem with .NET port?
« Reply #3 on: January 15, 2009, 08:08:43 am »
Quote
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.

Quote
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.
Laurent Gomila - SFML developer

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Font.GetImage doesn't exist? Problem with .NET port?
« Reply #4 on: January 15, 2009, 01:30:42 pm »
Quote from: "Laurent"
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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Font.GetImage doesn't exist? Problem with .NET port?
« Reply #5 on: January 15, 2009, 09:41:00 pm »
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? :)
Laurent Gomila - SFML developer

dabo

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • http://www.dabostudios.net
Font.GetImage doesn't exist? Problem with .NET port?
« Reply #6 on: January 15, 2009, 10:11:14 pm »
Quote from: "Laurent"
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.