draw 2d batch, Rectangles as destinations

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: draw 2d batch, Rectangles as destinations

Post by Mel »

Not exactly, he means that you can provide a list of vertices and indices to draw primitives in 2D, i.e., lists of flat triangles. What my function does is to build that list of triangles, so it only needs to be updated to be completely driver independant, and with a single path. I like much more that way. Thanks Hybrid! Not obstant, unlike the 2D draw primitive list, this funtion works on the software drivers too... unless the documentation is outdated..

By the way, i don't understand at all what happens with the boards, i tried to edit my posts, but it never worked, so i tried deleting the post and writting it again, and then, it appears twice... sincerely, i don't get it

edit: tested. The rendering doesn't get filtered, and doesn't work on the software drivers, none of them. i get a black screen.

This is Open GL using the draw2DprimitiveList

Image

This is Burnings video using my setup.

Image

but the changes are fairly simple.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: draw 2d batch, Rectangles as destinations

Post by hybrid »

For filtering you have to use the 2d override material. 2d render settings are separated from the usual material system. About software renderers I'm not sure, but basically the 2d primitive methods should be supported on all drivers. Have to check this.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: draw 2d batch, Rectangles as destinations

Post by Mel »

Then, it is settled.

Maybe it was already supported in the SVN, i stuck to the last release of Irrlicht so it was fully compatible.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: draw 2d batch, Rectangles as destinations

Post by Mel »

The only parameters that could be defaulted are the 3 last ones, that is, the whole clipping rectangle for the entire drawing, the color and the usage of the alpha channel.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply