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

Author Topic: [SOLVED] Parameter <mat4> not found in shader, even though it is used  (Read 1968 times)

0 Members and 2 Guests are viewing this topic.

Temeez

  • Newbie
  • *
  • Posts: 3
    • View Profile
http://hastebin.com/asemupasoc.avrasm

For some reason "view", "projection" and "model" parameters are not found in shader. They are being used in there and according http://www.sfml-dev.org/documentation/2.1/classsf_1_1Shader.php mat4 is supported.

I'm using couple weeks old SFML master version.
« Last Edit: July 11, 2014, 08:34:46 pm by Temeez »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Parameter <mat4> not found in shader, even though it is used
« Reply #1 on: July 11, 2014, 05:06:27 pm »
Everytime you call loadFromFile you reinitialize the sf::Shader instance. Calling it multiple times won't add the shaders to the same program. To load a vertex and fragment shaders in the same sf::Shader, use the other overload of loadFromFile. Well, in fact just read the dedicated doc and tutorials...
Laurent Gomila - SFML developer

Temeez

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Parameter <mat4> not found in shader, even though it is used
« Reply #2 on: July 11, 2014, 08:34:09 pm »
Everytime you call loadFromFile you reinitialize the sf::Shader instance. Calling it multiple times won't add the shaders to the same program. To load a vertex and fragment shaders in the same sf::Shader, use the other overload of loadFromFile. Well, in fact just read the dedicated doc and tutorials...

Well, I did, but I might have missed that part. For me the forums is the last place to seek help. Anyways, thx alot, stuff makes sense now! :)