draw2DPolygon just can draw a non filled circle.
another question: wheather irr supports drawing text on the screen or not,not using conctrols.
how to draw a filled circle
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
There's no Irrlicht method (AFAIK) that supports drawing filled 2D polygons. It would be possible to write one (that draws untransformed triangles), but could you just draw a circle bitmap instead?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Yeah, the video driver method produces unfilled polys, but OpenGL has a polygon primitive. Thi sin't supported by the other drivers, yet, but would probably a good place to start. The concyclic regular polys which would be used for a circle could also be made more generic and support a material or at least colors...
Use an image, define a transparent color (e.g. black or magenta) and render with "draw2DImage(...)" between driver->beginScene and driver->endScene:
Code: Select all
ITexture* pFilledCircle = driver->getTexture("FilledCircle.png" );
if(pFilledCircle)
driver->makeColorKeyTexture(pFilledCircle, SColor(0,0,0,0)); //transparent color
//...
driver->draw2DImage(pFilledCircle, position2di(0,568), rect<s32>(0,0,400,200), 0, SColor(150,255,255,100), true );