Jump to content
  • Advertisement
Sign in to follow this  
Paragon123

SFML.net Vector Arrays with shaders?

This topic is 705 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, as far as I can tell...

Each time SFML.net draws a tile it initializes a new draw call. (This is effectively immediate mode drawing right?)

 

When attempting to draw many sprites, arrayed like a tilemap the more efficent method is to generate a vertex array, filling it with the correct texture cords. This causes the entire tile map to get drawn in a single  draw call, right?

 

Is there a way to apply a specific shader to a specific cell using this method? Or more generally an arbitrary shader, with an arbitrary set of parameters to an arbitrary set of cells using vertex arrays? 

 

If there isn't, then how would a shader be used on the tiles in the tilemap without using Immediate mode to draw each sprite individually?

 

Do I have to do something complicated like create a uber shader that can call a different shader based on a value in a second texture? 

Draw a translucent image over the specific tiles with a shader that works on the existing pixels rather than the input pixels?

Edited by Paragon123

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!