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

Author Topic: Multi-texturing  (Read 2257 times)

0 Members and 1 Guest are viewing this topic.

TomCatFort

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://tomcatfort.net
Multi-texturing
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Multi-texturing
« Reply #1 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.
Laurent Gomila - SFML developer

 

anything