String is not rendered
by AIDan · in Torque X 3D · 05/23/2009 (8:08 am) · 1 replies
I have a ISceneObject3D object.
In the call Render(SceneRenderState sceneRenderState) I do the following:
Vector3 hudPos= GFXDevice.Instance.Device.Viewport.Project(_position, sceneRenderState.Projection, sceneRenderState.View, sceneRenderState.World.Top);
DrawUtil.JustifiedText(__font, new Vector2(hudPos.X, hudPos.Y), _size, TextAlignment.JustifyCenter, _color, _text);
The string is not shown although the position is correct as well as the size and the font I use is valid.
The size is: _size= __font.Instance.MeasureString(_text);
Maybe this is some render order issue? Any advice?
In the call Render(SceneRenderState sceneRenderState) I do the following:
Vector3 hudPos= GFXDevice.Instance.Device.Viewport.Project(_position, sceneRenderState.Projection, sceneRenderState.View, sceneRenderState.World.Top);
DrawUtil.JustifiedText(__font, new Vector2(hudPos.X, hudPos.Y), _size, TextAlignment.JustifyCenter, _color, _text);
The string is not shown although the position is correct as well as the size and the font I use is valid.
The size is: _size= __font.Instance.MeasureString(_text);
Maybe this is some render order issue? Any advice?
About the author
Torque Owner AIDan