On Tue, Dec 15, 2009 at 9:59 AM, Corbin <[email protected]> wrote:
> > Meh. No matter what, there's overhead. You might want to benchmark just how much overhead there is for each approach. ctypes calls are *really* expensive, so using the matrix stack wouldn't really gain anything over manually using python matrices (i.e. euclid.py). OpenGL draw calls are also pretty costly ( + massive ctypes overhead), to the point where 100-200 draw calls per frame is the absolute maximum for interactive performance on consumer hardware. Try and use one draw call per sprite, and you will be severely limited in what you can render... > I'm still > kind of annoyed that there's no matrix math in pyglet. I take it you are aware of euclid (http://code.google.com/p/pyeuclid/)? Alex wrote it as a lightweight matrix + vector math library for pyglet/pygame game development. I'm doubly > annoyed that subclasses of Sprite have to override _update_position() > (A private method!) in order to change anything about the way that it > gets drawn, since the method is so inflexible. > Yeah, that is kind of a pain. Not sure how one would really fix that part of the API while still allowing VBO caching of sprites… > > If it suddenly loads the texture directly as NPOT, my texture coordinate > > calculations are going to give blatantly incorrect results. > > Doesn't that also apply when using texrect? Every chipset put out this > decade supports texrect, either the NV or the ARB flavor, and pyglet > appears to be perfectly happy greedily using texrect when it can. > As far as I can tell, pyglet never gives the user a rectangular texture unless the user specifically requests it. There are exceptions, but only when pyglet expects to manage the texture for its entire lifetime (i.e. texture atlases) -- Tristam MacDonald http://swiftcoder.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
