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

Author Topic: Does sprite.setColor() use additional shaders internally?  (Read 1895 times)

0 Members and 1 Guest are viewing this topic.

Notion

  • Newbie
  • *
  • Posts: 17
    • View Profile
Does sprite.setColor() use additional shaders internally?
« on: July 08, 2017, 01:04:17 pm »
This is a question of efficiency I guess. If I set the color of a single sprite to a new Color, does the rendering require the GPU to switch shaders? Does every colored object has its own shader? Would it be of any use, to pool Objects colored in the same color regarding their draw-calls?

Thanks in advance!
« Last Edit: July 08, 2017, 01:41:15 pm by Notion »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Does sprite.setColor() use additional shaders internally?
« Reply #1 on: July 08, 2017, 02:08:27 pm »
Of course not... SFML doesn't use shaders internally, and even if it did, they can use variables passed from C++, no need to hard-code different shaders to support multiple color values ;)
Laurent Gomila - SFML developer