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

Author Topic: Setting up shader problems  (Read 1194 times)

0 Members and 1 Guest are viewing this topic.

smilesprower

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
Setting up shader problems
« on: October 29, 2016, 11:45:20 pm »
Just looking over the asset SFML manager on Git and wondering the following.

// Loads Shader into a map
m_shaders.load(Shaders::Shockwave, "../resources/shader/shockwave.vert", "../resources/shader/shockwave.frag");

// x = shader in the map
sf::Shader &x = m_shaders.get(Shaders::Shockwave);

If I had a shader created in my .h file how do I go about adding the shader stored in my map to the shader I created ?

Or is it better to ignore an assest manager for shaders and just loadFromFile ?

smilesprower

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
Re: Setting up shader problems
« Reply #1 on: October 30, 2016, 12:43:18 am »
Problem solved, just created a sf::shader * m_shockwave;
m_shockwave = &m_shaders.get(Shaders::Shockwave);

Still learning.