Thickness for 2D lines

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
Pan
Posts: 24
Joined: Tue Jan 20, 2009 9:36 am
Location: Bavaria, Germany

Thickness for 2D lines

Post by Pan »

I'm having a very simple problem: changing the thickness of drawn 2D lines. I searched the forum, but all questions regarding line thickness address only the 3D lines ..

Now, here's my problem:
I set up a basic material for drawing 3D lines, which also changes the SMaterial value for Thickness. This works fine for 3D lines, but curiously enough doesn't seem to affect 2D lines..?

Some code:

Code: Select all

/* initial setup */
// basic material (no lighting, thick lines/points)
irr_ctrl.base_mat.setFlag(video::EMF_LIGHTING, false);
irr_ctrl.base_mat.Thickness = 3.0;

/* render loop */
irr_ctrl->driver->setMaterial(irr_ctrl->base_mat);
irr_ctrl->driver->draw2DLine( <start>, <end>, SColor(255,255,0,0) );
All 3D lines which are drawn during the render loop are fine, i.e. have a thickness of 3. However, all 2D lines have not .. what am I missing here? (Between the 3D and 2D lines, textures etc. are drawn, but this shouldn't have any effect?)

*edit: I'm running under OpenGL, since the 3D line thickness seemed to have problems under D3D (don't know whether this still is true).
Wanted: Schrödingers Cat. Dead or alive.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

D3D still has no support for line thickness. The problem with 2d lines is that you cannot set a material for 2d elements - it's simply ignored even if you'd do so. I'm currently working on some updates of the 2d states, so maybe Irrlicht 1.6 will have a fix for this.
In order to avoid losing track of this issue you should make a bug report at our bug tracker (https://sourceforge.net/tracker/?group_ ... tid=540676)
Pan
Posts: 24
Joined: Tue Jan 20, 2009 9:36 am
Location: Bavaria, Germany

Post by Pan »

Alright, done.
Wanted: Schrödingers Cat. Dead or alive.
Post Reply