I am having big time problems to sucessfully render SPARK 2 particle systems, I always get a crash.
Already trying to solve it in SPARK forum, but still no solution.
If someone managed to use SFML 2 and SPARK 2, I would appreciate the help. Follows the pasted post of the SPARK forum.
http://spark.forum0.net/t146-renderer-crashI've tried to create a minimal example that reproduces the error for me.
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();
}
Also, the Call Stack dies right there..
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++
Its the same crash I get from the other application, but in this case it doesn't even render one frame, while in the other i see the snow flocks a little time
As you can see, i use the latest SFML 2 for windowing, we both know it is pretty good
When i mean latest, i mean from yesterday! I fetched the most recent versions of all libraries i use yesterday, compiled them all, and even changed to vs2010 from vs2008. So, different conditions, same problem.
Of course I can be compiling SPARK 2 wrong, but I pretty much compiled it with default settings..