DGL https://delphigl.com/forum/ |
|
Frustum culling and quad tree problem https://delphigl.com/forum/viewtopic.php?f=19&t=3181 |
Seite 1 von 1 |
Autor: | BTierens [ Mi Aug 18, 2004 17:04 ] |
Betreff des Beitrags: | Frustum culling and quad tree problem |
This is a complex question. I have a tile based landscape with frustum culling and a quad tree. There are tiles that aren't drawn while they should be drawn and I can't find a bug. Can somebody help me? The first unit is the quadtree unit: http://home.deds.nl/~svg/quadtree.htm This is the sclMath unit wich contains frustum culling functions: Code:
The frustum culling code is a translation from http://web.archive.org/web/20030601123911/http://www.markmorley.com/opengl/frustumculling.html First I call the createQuadTree procedure and when the camera moves, I call calcTilesInFrustum and draw the tiles returned by this procedure (the data stored in the tilesInFrustum array). An image to show the problem (see the right and top side): ![]() |
Autor: | Stucuk [ Mi Aug 18, 2004 18:06 ] |
Betreff des Beitrags: | |
There is only one difference i can see between ur Frustum and the one im using, with the one im using the normalizing in the "ExtractFrustum" has been commented out. |
Autor: | BTierens [ Di Aug 24, 2004 08:07 ] |
Betreff des Beitrags: | |
I've found the bug. Thanks for your help. |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |