> Graphics cards don't draw quads, they will be split up into triangles by the
> driver anyway. You are probably better off pre-triangulating (most exporters
> and modelling packages have this option), and then rendering everything as
> triangles.
Done, a bit of a downer to this imo is the disk size but I guess in a
world where google throws gigabytes at your head you shouldn't bicker
about 1-2k more or less :)
> Pyglet's vertex_list is considerably simpler to use. Beyond that,
> vertex_list will use VBOs (Vertex Buffer Objects) if available, to ensure
> your vertex data is actually in video memory.
After implementing it I was still having trouble with the performance
from as little as 100-200 entities.
I was playing around a bit and when I disabled the material setting on
each model suddenly my frames jump into the 1000fps.
What is the way to efficiently switch between materials as this
apparently is causing major slowdown:
def compile(self):
self.gllist = glGenLists(1)
glNewList(self.gllist,GL_COMPILE)
for mat, vlist in self.ivlists: # ivlists are dicts where key =
material name and value = IndexedVertexList
# Disabling next statments gives me frame boost
glMaterialfv(GL_FRONT, GL_DIFFUSE, materials[mat]['diffuse'])
# And all other material properties here one by one as well as
texture binding
vlist.draw(GL_TRIANGLES)
glEndList()
Do notice this is while compiling the list, apparently the list
actually also does the glMaterialfv and glBindTexture call each frame
which (I suspect) is pushing the texture down the pipeline each frame
(Ouch, poor PCIe bus ;)
I guess I have to use something like glPushAttrib or glPushState but
what is appropriate for material and texture calls ?
A simple rtfm with a good tutorial anyone found particulary usefull
would be appreciated.
Regards,
Niels
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---