[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Fun with C modules
On Fri, 21 Dec 2001 05:46, Pete Shinners wrote:
> > How many triangles are in the display list? I don't have the luxury of
> > display lists since the triangles share no similarity, being part of a
> > landscape. I use display lists for other things though, like trees, etc.
> > They definitely help there :)
>
> i think jan means draw the landscape using drawlists. even though you
> only use it once per frame, it means you only need to make a single
> function call to render the ground. (thus python gets out of the way)
The landscape is far too large do be put into a display list. The majority of
the triangles aren't visible - which is why I'm using an octree to figure the
potentially visible triangles. It's not the most optimal way to do landscape,
but I intend to put all the other objects into the octree so they're all
handled at once.
AAARGH!
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 :)
> still, all the culling functions will be quicker in C, i've just not
> played with it that stuff to really know how much quicker.
A lot, by my timing :)
Richard
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org