SFML community forums

Help => Graphics => Topic started by: PinkyRed on November 17, 2009, 11:43:04 pm

Title: Render to image
Post by: PinkyRed 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.
Title: Render to image
Post by: Laurent on November 17, 2009, 11:46:06 pm
Nothing in SFML 1.x, but there is sf::RenderImage in SFML 2.
Title: Render to image
Post by: ShadowDancer 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
Title: Render to image
Post by: l0calh05t 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)