Original Post
Hi there,
I'm new in this forum.
At our university we have to program a game with DirectX9.
Me and some other students wanted to program a Minecraft-like game, but without unlimited terrain (don't worry
)
Now we have a problem with our performance.
Our strategy is, that we have a chunk with 16^3 blocks. We are going through all blocks and look if there is a neighbour above, in front, .....
If there is one we dont put the vertices and indices of this side of the cube into the buffer. This works really quick.
Now we made a class for a chunk. In this class we create the buffers and put in the vertices and indices and save them in a std::vector.
On rendering we fill the buffers with memcpy and draw the primitives.
If i try to draw 4 chunks, everything works fine with 60 fps. But if I try to draw more chunks (e.g. 64) the performance goes down to 8 fps.
I've added my source-code and wanted to ask for a strategy to improve the performance.
Source: [attachment=8313:Kubos.zip]
I hope you understand me (I'm german and my english isn't very well
)
I'm new in this forum.
At our university we have to program a game with DirectX9.
Me and some other students wanted to program a Minecraft-like game, but without unlimited terrain (don't worry
Now we have a problem with our performance.
Our strategy is, that we have a chunk with 16^3 blocks. We are going through all blocks and look if there is a neighbour above, in front, .....
If there is one we dont put the vertices and indices of this side of the cube into the buffer. This works really quick.
Now we made a class for a chunk. In this class we create the buffers and put in the vertices and indices and save them in a std::vector.
On rendering we fill the buffers with memcpy and draw the primitives.
If i try to draw 4 chunks, everything works fine with 60 fps. But if I try to draw more chunks (e.g. 64) the performance goes down to 8 fps.
I've added my source-code and wanted to ask for a strategy to improve the performance.
Source: [attachment=8313:Kubos.zip]
I hope you understand me (I'm german and my english isn't very well