What could be the reason for slow rendering?
I mean i cant render over 14x14 tiles (i disabled everything else) just rendering lid faces with vertex arrays.
Its smooth and very low cpu usage with 14x14 range (14 blocks in X and 14 blocks in Y direction). And of course Z, which can have max 7 tiles (layers), i only draw if layer block is textured.
But if i try to render even more cpu usage gets higher and higher.
Dunno if octree could help but what else could i try?
How to render more with 0 or very low cpu usage?
Original editor has always 0 cpu usage, only when you change block or move mouse or rotate the scene it gets a bit higher and after that its 0 again.
Dunno how they did it. Its 1998 VC++ MFC app and DirectX.
I used SetFrameInterval(33) in game.create;
I used Sampling Profiler for Delphi and it shows that DrawBlock function is the slowest.
There i just draw all the faces.
OpenGL state changes are also there. Like glEnableClientState etc..
Edit: actually even slower function is the function that calculates the UV coords for tiles (95.5%).
I only hard coded default rotation/tile coords. Rest is calculated. Here i guess some kind of "lookup table" would help ?
This function is called for every block and every face.
Basically "each frame".
Any ideas how to speed different things up?
Bookmarks