poly strips

Previous topic - Next topic

Kitty Hello

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.

Qube

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?

doimus

Yes, an example for the dumber of us, please.   :-[

codegit

Yes, please, a small example will be good. (for us lesser gifted programmers)  ;/
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

Kitty Hello


Schranz0r

I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

bigsofty

Cool, a real nice oldskool (but still very relevant) way of speeding up GL! ;)
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Qube

Love the new command, make things for us mere mortals easy to work with  8)

kaotiklabs

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?

Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

Kitty Hello

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.