Skip to main content
gamedev.net
🔒 Locked

A design question!

Started by fms 0 replies 400+ views
Original Post
fms
fms
Hi, For my particle simulation, I was thinking of rendering realtime while I am also performing simulation every time-step. But I see a huge performance loss. I am now thinking of first completing the simulation and storing the results in an array thus storing them on the CPU. And once I have completed the simulation, then I render them. I believe this way I can achieve maximum performace at both ends. I want to ask you guys if rendering and simulating simultaneously is a better choice or doing simulation first and then rendering is better in terms of design. My particle simulation is n-body problem. Ofcourse, simulation performance is critical.. All feedback is appreciated. Thanks.
Cocalus
Cocalus
I guess your rendering our particles with immediate mode, or a bunch of small vertex arrays. Then doing all you math and then rendering with one (or a couple) vertex arrays should be much faster. And OpenGL is buffered so you can have your cpu calculate the current frame while your gpu is rendering the previous frame.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.