On 2015-01-20 at 09:44, Gerd Hoffmann wrote:
   Hi,

This looks like a list for GL_TRIANGLES instead of GL_TRIANGLE_STRIP.
For GL_TRIANGLE_STRIP, you first define one whole triangle (by
specifying each of the three vertices) and after that, each vertex
results in a new triangle drawn (whose two other vertices are the two
vertices preceding the last one).
Thanks for the nice description.

So the trick to get it done with only four vertexes is to put the
correct points (which are going to be shared by both triangles) into the
middle.  I've played around with it a bit without success (and before my
new opengl book arrived), and this 6-point version worked ...
Hm, I did write a working solution in my reply, didn't I?
Yep, was just trying to explain how I ended up with the 6 vertex
version, not having fully figured how triangle strips are working.

I see.

All fine now, I've changed it to use 4 vertexes version instead, and I
_also_ understood why it is working as intended.

Great. :-)

FYI: current code is at
   https://www.kraxel.org/cgit/qemu/log/?h=rebase/ui-sdl-next

Thanks!

Max

Reply via email to