On Thu, Nov 6, 2008 at 2:33 PM, Jonathan Hartley <[EMAIL PROTECTED]>wrote:

>
> Thanks for all the great info, people.
>
> While we're on the subject, just in case I've totally misunderstood:
>
> Am I right in thinking that within a single batch, I can't draw one
> set of vertices with one modelview matrix setting, and a different (or
> even the same) set of vertices with another modelview setting?

In general, that is correct. However, there are several ways to get around
this restriction, using a technique know as 'instancing'.

Instancing is not as widely supported by OpenGL as by DirectX, primarily
because OpenGL draw calls are very lightweight. However, if you are drawing
many models with very few triangles, instancing may provided a decent
performance boost.

On (very) recent hardware, you have access to the GL_ARB_draw_instanced
extension, which adds full instancing to OpenGL:
http://opengl.org/registry/specs/ARB/draw_instanced.txt

On older hardware, you can fake instancing using shader uniform variables,
as described by NVidia:
http://http.download.nvidia.com/developer/SDK/Individual_Samples/DEMOS/OpenGL/src/glsl_pseudo_instancing/docs/glsl_pseudo_instancing.pdf

Thanks for any confirmation (or otherwise) of my understanding.
>
>
>
>
> On Nov 6, 2:14 pm, "Tristam MacDonald" <[EMAIL PROTECTED]> wrote:
> > On Thu, Nov 6, 2008 at 12:08 AM, josch <[EMAIL PROTECTED]> wrote:
> >
> > > a guy called __doc__ advised me to replace my GL_QUADS by GL_TRIANGLES
> > > in my tile engine a few days ago because of performance isues. I did
> > > that and on my "modern" intel X3100 hardware i had EXACTLY the same
> > > framerates with triangles as with quads.
> >
> > My X3100 seems to defy several basic rules of optimisation - I think
> > integrated hardware just has very different performance characteristics.
> On
> > my old ATI X1600, index triangle strips were definitely the fastest,
> > followed very closely by indexed triangle lists. I found the difference
> too
> > small to measure if you are pushing less than 1,000 triangles per draw
> call
> > - so it may not be worth the bother to change.
> >
> >
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to