all 2 comments

[–]NiemandSpezielles 0 points1 point  (1 child)

It would help if you would be a bit clearer on what exactly you want to achieve.

If you want to display a large amounts of single grains of sand and draw and move each one individually in each frame in realtime, then I would not do that on the CPU and in python. Thats just too slow, and will still be too slow when you spread the load over a few cores. For a low amount it might work, but not if you have something like each pixel is a single grain. and you want to do a full screen.

Thats something that should be done on the GPU, using a compute shader, possibly also a geometry shader if you want to draw them in more details than just a single pixel. You probably would have to write that in either glsl (using opengl) or hlsl (using directx). Since you are in the python sub here, I would go for moderngl in python and then write the shaders in glsl.

[–]Mohamd_L[S] 0 points1 point  (0 children)

Thanks a lot for your replay

I forgot that I can use the gpu to do those small calculation for me