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

Author Topic: Integer/Uint/bool setParameter functions in sf::Shader?  (Read 2583 times)

0 Members and 1 Guest are viewing this topic.

felldiddy

  • Newbie
  • *
  • Posts: 1
    • View Profile
Integer/Uint/bool setParameter functions in sf::Shader?
« on: August 19, 2013, 02:20:31 am »
Hello,

I've been using SFML for a few months now, and I must say thank you for a wonderful OpenGL library!

I was wondering if it would make sense to expose the int/uint/bool forms of glUniform() in sf::Shader?  It feels like it's a little awkward having floats only to me.

Also, I'm just curious, is there a reason that sf::Shader uses ARB syntax still, despite the rest of the code base being based around OpenGL2 or greater?  It's obviously not hurting anything, just curious.

Many thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Integer/Uint/bool setParameter functions in sf::Shader?
« Reply #1 on: August 19, 2013, 07:46:26 am »
Quote
I was wondering if it would make sense to expose the int/uint/bool forms of glUniform() in sf::Shader?  It feels like it's a little awkward having floats only to me.
I think it would, yes. The only potential drawback is that it may cause ambiguous calls if you don't use exactly one of the supported types.

Quote
Also, I'm just curious, is there a reason that sf::Shader uses ARB syntax still, despite the rest of the code base being based around OpenGL2 or greater?  It's obviously not hurting anything, just curious.
I'm only using OpenGL 1.2 core functions, the rest is used through extensions. Don't forget that Windows OpenGL headers and libs are still stuck at version 1.4.
Laurent Gomila - SFML developer