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

Author Topic: sf::Shader - Vertex Attributes  (Read 1616 times)

0 Members and 1 Guest are viewing this topic.

sNIk

  • Newbie
  • *
  • Posts: 10
    • View Profile
sf::Shader - Vertex Attributes
« on: January 24, 2012, 05:27:53 pm »
hello there!

as i can see there is no support for vertex attributes in sf::Shader. am i just blind or is this really the case?

cheers!
OS: Gentoo Linux
Kernel: 2.6.39

GPU: Radeon HD 3650
CPU: Intel(R) Core(TM)2 Duo CPU     T9400  @ 2.53GHz

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::Shader - Vertex Attributes
« Reply #1 on: January 24, 2012, 07:32:24 pm »
This is the case.

What would you do with vertex attributes? Do you have an example?
Laurent Gomila - SFML developer

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: sf::Shader - Vertex Attributes
« Reply #2 on: September 24, 2013, 03:24:39 pm »
Sorry to drag up an old topic but I've just come across this myself. Currently I'm mixing rendering 3D meshes with SFML, and rather than write a bunch of my own classes to deal with creating shaders/ programs it's easier for me to just load an SFML shader and bind it when needed. It works perfectly for most applications (lighting and things), but I need to access the vertex attributes when using a normal map shader so I can send my array of vertex tangents. As far as I can see I need something like sf::Shader::getParamLocation() to pass the correct ID to glVertexAttribPointer (although I'm a bit new to this so I may be wrong). I realise 3D will always be off the table in SFML, so I understand if something like this won't ever be implimented (but it would be nice,  ;) ;) ;))