[cogl journal] If we are only flushing one quad use a TRIANGLE_FAN
authorRobert Bragg <robert@linux.intel.com>
Thu, 28 May 2009 01:03:16 +0000 (02:03 +0100)
committerRobert Bragg <robert@linux.intel.com>
Thu, 28 May 2009 01:43:36 +0000 (02:43 +0100)
commitf0849fc3e25185e86464cadcc98a7bcdac1b0ab8
treec72d69496de67bc787687320134511b3be2ea94b
parent57cb20dc0685889b5eaa89d409a47d67d15450fb
[cogl journal] If we are only flushing one quad use a TRIANGLE_FAN

At the moment Cogl doesn't do much batching of quads so most of the time we
are flushing a single quad at a time.  This patch simplifies how we submit
those quads to OpenGL by using glDrawArrays with GL_TRIANGLE_FAN mode
instead of sending indexed vertices using GL_TRIANGLES mode.

Note: I hope to follow up soon with changes that improve our batching and
also move the indices into a VBO so they don't need to be re-validated every
time we call glDrawElements.
clutter/cogl/common/cogl-primitives.c