0 Members and 2 Guests are viewing this topic.
pixel_buffer temp_image(view.width,view.height,colour(255,255,255));for each vertex in view{ Polygon shadow(colour(0,0,0)); shadow.add(vertice.start); //A shadow.add(projection(vertice.start)); //B shadow.add(projection(vertice.end)); //C shadow.add(vertice.end); //D temp_image.draw(shadow);}temp_image.set_alpha(200);window.draw(temp_image);
There's a source code on the wiki for a complete light manager:http://www.sfml-dev.org/wiki/fr/sources/lightmanagerThe page is in french but you should be able to use the code.And it's for SFML 2.
And it's for SFML 2.