Faster Sprites?

Member
Posts: 254
Joined: 2005.10
Post: #1
Does anyone know if drawing a sprite would be done faster on two triangles rather than one quad?

Mostly I just want to know for curiosities' sake as I figure there are a lot of better ways to speed up the rendering of sprites. For example, grouping common sprites so you only need one glBindTexture call.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #2
Blacktiger Wrote:Does anyone know if drawing a sprite would be done faster on two triangles rather than one quad?
One quad *is* two triangles. The quad is faster because two of the six vertices needed for the two coplanar triangles of the quad are only sent once. Trying to speed up textured quads for sprites in OpenGL is an impractical exercise in my experience.
Quote this message in a reply
Sage
Posts: 1,234
Joined: 2002.10
Post: #3
It is actually possible that the quad is faster, if the renderer is written to special-case screen-aligned quads and turn the blit into essentially a memcpy, instead of interpolating attributes across two triangles. But this is only a possibility in a software rasterizer, all hardware is going to break the quad into two triangles.
Quote this message in a reply
Member
Posts: 254
Joined: 2005.10
Post: #4
AnotherJake Wrote:One quad *is* two triangles. The quad is faster because two of the six vertices needed for the two coplanar triangles of the quad are only sent once. Trying to speed up textured quads for sprites in OpenGL is an impractical exercise in my experience.

As I said, mostly I'm just curious. Is there a difference then between drawing a quad and drawing two triangles in a triangle strip?
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #5
Not that I am aware of.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Will VBOs be faster than display lists for simple meshes? TomorrowPlusX 14 6,061 Nov 30, 2004 03:32 PM
Last Post: arekkusu
  Faster OpenGL in Cocoa Krevnik 31 12,328 Oct 8, 2004 10:36 PM
Last Post: AnotherJake
  A faster way to draw a square Joseph Duchesne 7 3,894 Sep 22, 2003 12:25 PM
Last Post: inio