Jump to content

[SOLVED] Size of LineStrip in DynamicMesh


photo

Recommended Posts

Hi,

 

I have developed a circle using a dynamic mesh by adding lines to the specified number of vertices. I am trying to find a way to increase the width of the line, but unable to find solution.

 

Can anyone help me in increasing the Line width for an dynamic mesh. Below are the step I do to create the dynamic mesh.

 

meshObj = new ObjectMeshDynamic();

meshObj.setSurfaceMode( OBJECT_MESH_DYNAMIC_MODE_LINES, 0 );

meshObj.setMaterial(material, "*");

meshObj.setProperty("surface_base", "*");

 

meshObj.addLineStrip(numVertices);

 

forloop(int i = 0; numVertices)

{

//Calculate my circle logic and replace i value

meshObj.addVertex(i);

}

meshObj.updateBounds();

meshObj.flush();

 

Now I need some way to increase the width of this line, as my dynamic object is place very far & I am not able to see the line of this circle.

Link to comment

Just specifiying MODE_LINES is not enough to draw lines, this just influences how vertices and adjencency information will passed to the geometry shader.

 

If you want to draw lines on DX10+ HW than have a look at UNIGINE sample data/samples/shaders/lines_00 to draw lines of the arbitrary width using a geometry shader.

 

If you have just DX9 HW than you have to provide "real" triangle strip mesh geometry even for thin line drawing. See this post for an example.

  • Like 1
Link to comment
×
×
  • Create New...