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

Author Topic: Regarding the limitations of sf::Shader::setParameter()-implementations  (Read 2377 times)

0 Members and 1 Guest are viewing this topic.

Haikarainen

  • Guest
I am using SFML for 2D-drawing and easy texture/shader-management in pretty much all of my projects that need it, and yesterday I came across the limitations of the sf::Shader::setParameter-implementations: It is VERY 2d-oriented (like much else in SFML), but a general Shader-class shouldnt really be 2d-oriented imho.

Anyway I added an implementation that can take a/several 4x-matrices as an argument (you need this for any proper 3d-application really). find it here: http://pastebin.com/05h9Y0af

Also I understand if you want to keep the library 2d-oriented, and I get if you REALLY dont want to create sf::Transforms etc that is 3d-oriented, but I would really appreciate if you loosened up on a few things to make it easier for us who is not strictly 2D to use SFML to its full potential. (I use both shaders and rendetextures a _LOT_ and it makes my life way easier by not having to fiddle around with FBO's etc and try to combine them with SFML's awesome 2d-drawing).

It would also make me able to release my software and not having to link statically or include my custom sfml-versions.

Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Regarding the limitations of sf::Shader::setParameter()-implementations
« Reply #1 on: November 10, 2012, 02:04:08 pm »
sfml-graphics does not and will never support 3D graphics.

I know that some classes are almost usable directly in 3D, and the 1% of missing features can be frustrating, but I really don't want to go this way, sorry.

However feel free to copy and adapt SFML code to create your own 3D classes ;)
Laurent Gomila - SFML developer

Haikarainen

  • Guest
Re: Regarding the limitations of sf::Shader::setParameter()-implementations
« Reply #2 on: November 10, 2012, 02:13:33 pm »
sfml-graphics does not and will never support 3D graphics.

I know that some classes are almost usable directly in 3D, and the 1% of missing features can be frustrating, but I really don't want to go this way, sorry.

However feel free to copy and adapt SFML code to create your own 3D classes ;)

If you ask me the changes that happened from version 1.6 to version 2.0 really creates a need to work on _fully_ implementing vertex shaders. Either you have it or you dont, you dont add "Oh fancy vertex-shader support" and only commit to it 50%.

It would be a shame to have to leave SFML2 completely behind me and create my own API because of these tiny things.

EDIT: Also I'm not saying make sfml 3d-oriented, I'm just saying dont block its potential out "just because".
« Last Edit: November 10, 2012, 02:18:17 pm by Haikarainen »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Regarding the limitations of sf::Shader::setParameter()-implementations
« Reply #3 on: November 10, 2012, 02:47:10 pm »
I heard you and I understand your concern, don't worry. This can be discussed again after SFML 2.0 is released (it won't break the API).

I don't like when my design blocks people, so... maybe compromises can be found ;)
Laurent Gomila - SFML developer

 

anything