Page 1 of 1

Single-color rectangles/shapes?

Posted: Thu Sep 20, 2012 4:57 pm
by ping-pong2012
Is there a way to make a rectangle and load a single color into it, preferably with an alpha channel?

On a similar note, is there vector graphics?

Re: Single-color rectangles/shapes?

Posted: Thu Sep 20, 2012 6:39 pm
by Mel
You can use the draw2Dprimitive method. Using colored vertices you can draw colored shapes, and with this, you can achieve results similar to a vectorial rasterizer

http://irrlicht.sourceforge.net/docu/cl ... 42af54d140

(maybe this should be moved to the help forums?)

Re: Single-color rectangles/shapes?

Posted: Thu Sep 20, 2012 9:20 pm
by ping-pong2012
Ah, the filled square was what I was looking for. As for the other things, it seems there aren't options for rotating any of these primitives, strange.

Re: Single-color rectangles/shapes?

Posted: Thu Sep 20, 2012 9:54 pm
by hybrid
Yes, 2d primitives wree originally developed for simple GUI elements only. Thus, the API did not provide rotation and other things. You should instead use 3d elements in those cases.

Re: Single-color rectangles/shapes?

Posted: Wed Oct 03, 2012 10:03 pm
by chronologicaldot
@ ping-pong2012:
You could just draw a simple scene node with 4 vertices forming a rectangle.
http://irrlicht.sourceforge.net/docu/example003.html

Sorry the suggestion was so late.