SFML community forums

Help => Graphics => Topic started by: TomCatFort on October 13, 2010, 04:20:05 pm

Title: Multi-texturing
Post by: TomCatFort on October 13, 2010, 04:20:05 pm
I'm not so good with OpenGL stuff so I googled it, then used the forums search, but I did not found any multi-texturing regarding SFML.

What I want to achieve: Render the scene into a RenderImage, then render the light map (dynamic, as light could move, and light-cones even rotate) into an other render image. Then using a shader that combines the two and draws it to the render window.

What I'm asking: How should i set up the second texture so the fragment shader can use it. I know this solution has problems with old hardware, but is there anything else I should pay attention when implementing it? Especially regarding SFML.

Thank you for helping me out.
Title: Multi-texturing
Post by: Laurent on October 13, 2010, 04:30:45 pm
All you have to do is to pass the images to the shader with its SetTexture function.