Jump to content

Drawing coloured lines in visualizer


photo

Recommended Posts

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.

Link to comment

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...

Link to comment

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.

Link to comment
  • 12 years later...
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 ?

Link to comment
×
×
  • Create New...