voxel-engine icon indicating copy to clipboard operation
voxel-engine copied to clipboard

Use threading of 4 cores to improve performance.

Open Splizard opened this issue 10 years ago • 3 comments

Can you split into the 4 corners of the screen and assign a core to each? Would this allow you to reach 20fps?

Splizard avatar Feb 04 '16 00:02 Splizard

Probably, though 20fps is not fast enough for a game and if that requires 4 cores, there is insufficient CPU time left for game logic. It isn't that easy to implement either.

bcmpinc avatar Feb 17 '16 21:02 bcmpinc

It very well may not be fast enough for a game, but its fast enough for a real time renderer :)

Splizard avatar Feb 18 '16 03:02 Splizard

I can add a stride member to the surface struct and a method that allows you to split it into 4 new surfaces describing the 4 corners. I can add a similar method to the view_pane struct. Then I need to make the static variables in octree_draw.cpp thread-local. After that, you can split the octree_draw call into 4 separate calls and execute each on their own thread. To use thread-synchronization overhead, you might also want to use double buffering. Is there something that you want to use the voxel renderer for?

bcmpinc avatar Feb 27 '16 15:02 bcmpinc