421
General discussions / 2D Game Marketing Survey, Results will be released soon!
« on: March 05, 2012, 06:15:53 pm »
Completed the survey
![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Quote from: "DevilWithin"I was thinking of handling this by creating a utility class, a Shape extended.No need to reinvent the wheel, I've already written such a class
That would be a collection of sf::Shapes, to allow concave shapes, or simply sets of them..
By the way, my library also contains a triangulation algorithm, in case you want to split a polygon into triangles.
sf::RenderWindow window;
window.Create(sf::VideoMode(), "heye");
SPK::Ref<SPK::System> sparkSystem = SPK::System::create(true);
SPK::Ref<SPK::Group> effectgroup = sparkSystem->createGroup(400);
effectgroup->setName("Cool");
effectgroup->setRenderer(SPK::GL::GLPointRenderer::create(10));
effectgroup->addEmitter(SPK::SphericEmitter::create(SPK::Vector3D(1.0f,1.0f,-1.0f),0.0f,3.14159f,SPK::Sphere::create(SPK::Vector3D(),1.0f),true,-1,100.0f,0.2f,0.5f));
effectgroup->addModifier(SPK::Gravity::create(SPK::Vector3D(0.0f, 0.3,0.0f)));
effectgroup->addParticles(100, SPK::Vector3D(200,200,0), SPK::Vector3D());
while(window.PollEvent(sf::Event())){
}
sf::Clock c;
while(window.IsOpen()){
window.Clear();
sparkSystem->updateParticles(c.GetElapsedTime().AsSeconds());
c.Restart();
SPK::GL::GLRenderer::saveGLStates();
sparkSystem->renderParticles();
SPK::GL::GLRenderer::restoreGLStates();
window.Display();
}
Sandbox.exe!SPK::System::renderParticles() Line 206 + 0x16 bytes C++
Sandbox.exe!SPK::Group::renderParticles() Line 272 + 0x38 bytes C++
> Sandbox.exe!SPK::GL::GLPointRenderer::render(const SPK::Group & group, const SPK::DataSet * dataSet, SPK::RenderBuffer * renderBuffer) Line 132 + 0x15 bytes C++