bcmpinc / voxel-engine

An experimental non-gpu 3d voxel engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use threading of 4 cores to improve performance.

Splizard opened this issue · comments

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

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.

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

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?