SFML community forums

Help => Window => Topic started by: youri1er on February 06, 2015, 03:09:19 am

Title: RenderWindow::capture() fps down
Post by: youri1er on February 06, 2015, 03:09:19 am
Hi, i've make a game, and like "geometry wars" i want to put a post effect on the result of the renderWindow.

I''ve make a shader "Bloom". The probleme is that : my shader take one parameter : a texture
And the function RenderWindow::capture() decrease a lot my fps.

Have you and idea to improve my situation or to solve it ?

Sorry for my bad english.
Title: Re: RenderWindow::capture() fps down
Post by: FRex on February 06, 2015, 03:13:43 am
You should not use capture to get window content into a shader:
http://www.sfml-dev.org/documentation/2.2/classsf_1_1RenderWindow.php#a9bd8655d0bac83145bfc329ea7a6d538
Title: Re: RenderWindow::capture() fps down
Post by: youri1er on February 06, 2015, 03:15:54 am
I know, i read the documentation and i search before posting here.

But i don't know hot to get the final texture of my game... Have you another way to do it ?
Title: AW: RenderWindow::capture() fps down
Post by: eXpl0it3r on February 06, 2015, 04:02:39 am
Draw to a render texture then draw the render texture with the bloom shader to the window.
Title: Re: RenderWindow::capture() fps down
Post by: youri1er on February 06, 2015, 10:11:28 am
Thank you it works fine. I've finish my grid of geometry wars.