how to display text mesh without lights.

hi im into development of a cad system using vb.net and managed directx. and i use the vertex format - positioncolored

now i have display text and im using mesh.textfromfont.

after having creating the mesh object. i am not able to display it.

i am just using tmesh.drawsubset(0) inside the begin.....end scene block.....

i cant use lights coz all my other vertices use position colored vertex

format....plz help......i moreover dont find any things to determine

the x,y,z of the mesh.......how do i place it if i was able to draw it

on screen.
-
well sorry now i found that the text mesh does appear but the problem is that its too small.....even if i give more font size.........how can i increase the mesh size without affecting the other objects......if i do world transformation.....all the objects in the world gets transformed.......

[861 byte] By [Rajavanya] at [2007-12-25]
# 1

You set the world matrix before you draw the mesh to include a scale, then you set it back to a non scaling matrix before you draw all of the things. The world matrix affects whatever is drawn after it is set and its very common to set it differently for every item in the world.

TheZMan at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2
So does that mean that in a typical game. all the objects have to go through a series of matrix transforms individually.

one more question - Is there no other way to increase the actual size of the mesh permanently.

Rajavanya at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 3
The ZMan wrote:

You set the world matrix before you draw the mesh to include a scale, then you set it back to a non scaling matrix before you draw all of the things. The world matrix affects whatever is drawn after it is set and its very common to set it differently for every item in the world.

thank you it works....but now there is a new problem...if i draw my mesh all my lines and other primitives render in white color only. i mean vertex.color = color.red.toargb doesnt work. if i comment my mesh.drawsubset(0), then the colors appear back what could be the problem...........

Rajavanya at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 4

1. Yes setting transformations for each object is common. When they go through the pipeline all the transformations are merged so it doesn't make any significant difference. This is how you can reusue the same mesh and put it in different places in the world.

2. To resize a mesh permanently you need to loop through all the vertices and apply the transformation yourself and then put the vertex back in the vertex buffer.

3. When you draw the mesh directx is probbly setting a vertex type which is different to the one you are using for the lines. How are you drawing the lines?

TheZMan at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 5
The ZMan wrote:

1. Yes setting transformations for each object is common. When they go through the pipeline all the transformations are merged so it doesn't make any significant difference. This is how you can reusue the same mesh and put it in different places in the world.

2. To resize a mesh permanently you need to loop through all the vertices and apply the transformation yourself and then put the vertex back in the vertex buffer.

3. When you draw the mesh directx is probbly setting a vertex type which is different to the one you are using for the lines. How are you drawing the lines?

I am using customvertex.positioncolored for all my linestrips, trianglelists and all primitives. once i draw the mesh generated with mesh.textfromfont method all the colors become white.

Rajavanya at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 6
Well i got back the colors.....i had to set

device.vertexformat once again after drawing the mesh in the renderloop........thats all thank u ZMan u r soo cool......

Rajavanya at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...