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

Author Topic: Applying shaders to vertexarray  (Read 2729 times)

0 Members and 1 Guest are viewing this topic.

SupanovaHSR

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Applying shaders to vertexarray
« on: October 19, 2016, 07:51:45 pm »
Been having "fun" applying multiple shaders to my particle engine, with some strange results.

I've followed the basic layout discussed in http://en.sfml-dev.org/forums/index.php?topic=12032.0

the shaders are being applied to the whole scene, not the verts, and the verts are not visible.

I  don't fully understand what's going on :(

buffer->clear();
                // draw verts into buffer
                buffer->draw(verts,state);

                // draw initial scene into buffer
                buffer->draw(sf::Sprite(inital_scene->getTexture()),state);

                buffer->display();

                std::swap(inital_scene, buffer);

I'm sure it's something simple but I can't see it, it's driving me insane now lol

 

anything