Jump to content

Drawing coloured lines in visualizer


photo

Recommended Posts

Posted

Functions like void engine.visualizer.renderLine3D(vec3 start, vec3 end, vec4 color)

seem to ignore the 'color' argument, I always get black lines.

 

e.g

 

vec4 vColor = vec4(1.f, 1.f, 0.f, 0.f);

 

engine.visualizer.renderLine3D( v4, v5, vColor);

 

still draws a black line.

 

Is there some other setting that needs to be changed? (nothing crosses my mind)

 

Also, renderQuad3D doesn't seem to work; I tried the same set of vertices with renderQuad and also with a set of renderLine

renderLine* worked, but not renderQuad.

I also tried the different winding orders, but to no avail.

 

 

Thanks,

Ashwin.

Posted

Try setting color alpha component to 1.0 e.g. Vec4(1,0,0,1)

Posted

Tried that already

 

vec4 vColor = vec4(1.f, 1.f, 1.f, 1.f);

still draws a black line

 

to be sure, also tried

vec4 vColor = vec4(255, 255, 255, 255);

 

but still no luck...

Posted

Just in case: do you have visualizer enabled at all?

"show_visualizer 1" console command

Posted

Yes, it is indeed enabled, just checked. I'm getting black lines, it's just the color that's a problem. Also renderQuad isn't working.

Posted

Can anyone shed light on this please, this is important for us because it'll cut down debugging time by a lot.

Posted

Please provide minimal test-case showing the problem(s), so others can have a quick look on it for providing you help

Posted

Actually, the visualizer uses both renderLine3D() and renderQuad3D() to render lines and quads in green color when visualizing world sectors and navigation meshes. You can check it on samples/paths/mesh_00 sample. So I can only second the previous post: please provide your test-case.

  • 12 years later...
Posted
On 9/7/2011 at 9:42 PM, ashwin.sudhir said:

Tried that already

 

vec4 vColor = vec4(1.f, 1.f, 1.f, 1.f);

still draws a black line

 

to be sure, also tried

vec4 vColor = vec4(255, 255, 255, 255);

 

but still no luck...

Problem solved ?

If still not , did you try use default Unigine::Math::Vec3::BLUE as your color parameter ?

×
×
  • Create New...