2D primitives - is there any way to draw a filled triangle?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Josh1billion
Posts: 125
Joined: Thu Dec 11, 2008 9:50 pm
Location: Wisconsin
Contact:

2D primitives - is there any way to draw a filled triangle?

Post by Josh1billion »

Hi guys,

I'm currently using three calls to draw2DLine() function to draw a triangle onto a texture. (To see what I mean, you can click here: http://img683.imageshack.us/img683/234/ ... hwalls.png -- this screenshot shows four such triangles)

Is there any alternative function that I can use to render a solid, filled-in triangle, instead of just the outline as happens when I use draw2DLine()?
www.JoshForde.com

Latest release: Super Orbulite World.
In development: Season of Dreams and others
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

You know there's API for that, I think you could use this:
virtual void draw2DVertexPrimitiveList (const void *vertices, u32 vertexCount, const void *indexList, u32 primCount, E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT)=0
Draws a vertex primitive list in 2d.
Working on game: Marrbles (Currently stopped).
Post Reply