Skip to main content
Answer the question in the comment.
Source Link

Something you could try using only SFML is to use a sf::RenderTexture. It allows you to render sf::Drawables offscreen.

So you could define multiple RenderTexture and mix them together before rendering on screen.

Be aware that by directly using SFML you cannot achieve 3D rendering.

Here's a link to the documentation : http://www.sfml-dev.org/documentation/2.3-fr/classsf_1_1RenderTexture.php

EDIT: Since I can't comment, here is my suggestion. You create 3 (or more) RenderTextures to hold the informations about the positions, the colors and the normals of your final image. You can then pass these textures to a shader computing your final image by using the informations stored in your textures. I have no clues about the performance of this approach since I never tried it.

Something you could try using only SFML is to use a sf::RenderTexture. It allows you to render sf::Drawables offscreen.

So you could define multiple RenderTexture and mix them together before rendering on screen.

Be aware that by directly using SFML you cannot achieve 3D rendering.

Here's a link to the documentation : http://www.sfml-dev.org/documentation/2.3-fr/classsf_1_1RenderTexture.php

Something you could try using only SFML is to use a sf::RenderTexture. It allows you to render sf::Drawables offscreen.

So you could define multiple RenderTexture and mix them together before rendering on screen.

Be aware that by directly using SFML you cannot achieve 3D rendering.

Here's a link to the documentation : http://www.sfml-dev.org/documentation/2.3-fr/classsf_1_1RenderTexture.php

EDIT: Since I can't comment, here is my suggestion. You create 3 (or more) RenderTextures to hold the informations about the positions, the colors and the normals of your final image. You can then pass these textures to a shader computing your final image by using the informations stored in your textures. I have no clues about the performance of this approach since I never tried it.

Source Link

Something you could try using only SFML is to use a sf::RenderTexture. It allows you to render sf::Drawables offscreen.

So you could define multiple RenderTexture and mix them together before rendering on screen.

Be aware that by directly using SFML you cannot achieve 3D rendering.

Here's a link to the documentation : http://www.sfml-dev.org/documentation/2.3-fr/classsf_1_1RenderTexture.php