Actually, we already have water physics. There is an option in the menu along with the heat simulation option that enables realistic water physics. It does cause lag with huge amounts of water.
Is it using GPU compute capabilities or CPU multithread?
Then Im continuing my opencl branch on TPT. Right now, only UpdateAir is complete. I will bench after I wire all constants to it. Will onform later. You can use it easily to convert any demanding loop into opencl. My classes are last message on opencl topic.
anyway, @andypat is right if it was other element used: ACID, for example, even with water equalisation used, it wont work like equallisated water; it is MUST work on all liquilds.
AEDIT: it works on all liquids
For testing, I added a std::cout and a printf into the Air::Air(Simulation & simulation) function but it prints nothing to console or msvc output when I run TPT . Flushing cout doesnt help too. Maybe air simulation is not working?
I mean the part which starts with:
//Simulation should do this.
make_kernel();
std::fill(%bmap_blo......
........
Edit: update_air is certainly working. Adding multiple instances of update_air makes lag in simulation function.
What is causing cout/printf not working?
:D I was nearly filling entire remaining HDD space :D
Okay, bug fixing / learning the SDL way is becoming harder than implementing GPU acceleration lol
Update Air is done, next is update air heat then update particles_i . These look demanding ones. update air alone doesnt change overall performance.maybe update_particles_i can. My GPU is HD7870 and CPU is fx8150 so I expect 10x performance at least.
Edit: update_particles_i is 15 times longer than update_air. Converting that can take months :S
Edit2: also when I change XRES,YRES values, I get memory corruption error. Why? If I cannot change XRES or YRES then why were they defined? Edit4: changing CELL from 4 to 1 gives same error too! What to do?
Edit3: update gravity async seems simple in the core but those threadings and async copies seemed harder to disable. I dont want to break the integrity by playing with thouse pthreads. Medium strength GPU could handle 25k particles easily realtime without any acceleration strcuture for O(N^2) complexity (all-pairs).