GLBasic forum

Main forum => Announcements => Topic started by: Kitty Hello on 2009-Nov-20

Title: poly strips
Post by: Kitty Hello on 2009-Nov-20
OK, next update will feature the command POLYNEWSTRIP and you can use STARTPOLY id, 2 to start drawing triangle strips.

That way you can draw individual quads as well as long quad strips quickly. The advantage is, when you have a tile base game, you can draw a full line in one piece and then only have to specify 2 vertices per quad!!
Then you start a new strip (internally just repeats the last and the next new point) to draw a degenerated triangle (not visible) and start drawing the next line.

I'll try it in my Wumbo and see if finally I can display the background.

Also, this is a great opportunuty to draw thse glowy lines, since they are triangle strips, too.

[edit]
Update is online. Seems really a bit faster.
Title: Re: poly strips
Post by: Qube on 2009-Nov-20
Oo, I like the sounds of this for my latest game. Anything to gain a few precious FPS  =D

I'm being a bit think (again). Could you whip up a tiny example of how this works please?
Title: Re: poly strips
Post by: doimus on 2009-Nov-20
Yes, an example for the dumber of us, please.   :-[
Title: Re: poly strips
Post by: codegit on 2009-Nov-20
Yes, please, a small example will be good. (for us lesser gifted programmers)  ;/
Title: Re: poly strips
Post by: Kitty Hello on 2009-Nov-20
http://www.glbasic.com/xmlhelp.php?lang=en&id=369&action=view (http://www.glbasic.com/xmlhelp.php?lang=en&id=369&action=view)
Oops - forgot that in the update.
Title: Re: poly strips
Post by: Schranz0r on 2009-Nov-20
 :enc:
Title: Re: poly strips
Post by: bigsofty on 2009-Nov-20
Cool, a real nice oldskool (but still very relevant) way of speeding up GL! ;)
Title: Re: poly strips
Post by: Qube on 2009-Nov-24
Love the new command, make things for us mere mortals easy to work with  8)
Title: Re: poly strips
Post by: kaotiklabs on 2009-Nov-25
IÃ,´m now drawing my game scroll using only one startpoly/endpoly for drawing all the tiles on the screen.
Should POLYNEWSTRIP be faster than my implementation?
I thought that drawing as much triangles as posible in just one call was the fastest way but IÃ,´m not sure after reading this post.

I would like to try POLYNEWSTRIP but I donÃ,´t totally get how to implement it for scrolling.
Could anyone post an extended example?

Title: Re: poly strips
Post by: Kitty Hello on 2009-Nov-30
with a strip you can draw a tile line in one batch:
Code (glbasic) Select

1-3-5-7
|/|/|/|
2-4-6-8

see - 4 quads, 8 nodes.
Then you can you the "new group" and start a seperate strip.