[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Fun with C modules



Richard Jones wrote:

> So anyway, I just _tried_ that approach. All that hard work I'd put into the 
> octree/frustum stuff. *sigh*
> 
> So I can't _change_ the landscape, and now I understand why that doesn't 
> happen in games. Instead of stuffing my triangles into the octree, I just 
> stuffed them into a display list. Frame rate went up from 42fps to 88fps. 
> Without me converting any of the tris to tristrips.
> 
> Lesson learnt for today :)

stuff each octree into a display list, and you can still use both. then 
you can just draw all the polys in an octree with a single call.

or i'd still say use the vertex buffers with Numeric python. then you 
can also have deforming terrain without a speed penalty. the display 
lists may still be a little quicker, but i don't expect it would be 
much. on the other hand, vertex buffers might actually be a win, since 
opengl only needs to transform each vertex once, instead of once for 
each polygon that uses it (four times for grid data).

although, if your landscape is just heightfield data, it's probably 
really a 'quadtree' instead of an 'octree'. haha </nitpick>

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org