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

Author Topic: Render to image  (Read 1929 times)

0 Members and 1 Guest are viewing this topic.

PinkyRed

  • Newbie
  • *
  • Posts: 1
    • View Profile
Render to image
« on: November 17, 2009, 11:43:04 pm »
How to render to image? I tried RenderWindow.capture, but to do it i need view(new window). Is possible, to do it w/o window? I found nothing in doc/tutorials.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Render to image
« Reply #1 on: November 17, 2009, 11:46:06 pm »
Nothing in SFML 1.x, but there is sf::RenderImage in SFML 2.
Laurent Gomila - SFML developer

ShadowDancer

  • Newbie
  • *
  • Posts: 26
    • View Profile
Render to image
« Reply #2 on: November 18, 2009, 09:17:46 am »
What u mean with SFML 2? SVN version? I looked for this function in svn doc, but found nothing. Where to download it?

Edit:
Why in sfml2 shader can be draw only with image? Now if i want blur image multiple times i must do smthing like this:
Code: [Select]

        int Number_Of_Blurs = 0;
for(int i = 0; i < Number_Of_Blurs; i++)
{
sf::Image Temp_Image = Image_Render.GetImage();
sf::Sprite Blur_Image(Temp_Image);
Image_Render.Clear();
Image_Render.Draw(Blur_Image, Effect);
Image_Render.Display();
}


And why no doc in SVN? :F

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Render to image
« Reply #3 on: November 18, 2009, 09:54:37 am »
You need to check out the sfml2 branch from svn, not the trunk (which is sfml 1.x)

 

anything