02-23-2018, 05:16 AM
I'm trying to get text working in my DXScene. I'm rendering directly to a winforms control by calling Render on my DXScene object. This seems to be working fine. I'm successfully rendering mesh data.
But I'm unable to get text working. This is what I'm trying:
Should this work? If not, what should I do instead? Do I need to render to a viewport3d instead? It isn't clear to me how to use all the functionality given some seems to be designed for using the wpf viewport3d control, but it is unclear whether I should be able to use this functionality in the DXScene or not, and if so how that works.
I've not been able to find any documentation that describes this dichotomy in your framework - am I missing something?
Thanks!
But I'm unable to get text working. This is what I'm trying:
Code:
var txt = new TextVisual3D
{
Text = "this is some text yo!",
LineThickness = 3,
Position = new Point3D(0, 0, 0),
TextDirection = new Vector3D(1, 0, 0),
UpDirection = new Vector3D(0, 1, 0),
TextColor = System.Windows.Media.Colors.HotPink,
};
obj.AddChild(new WpfModelVisual3DNode(txt));
_dxScene.RootNode.AddChild(obj);
Should this work? If not, what should I do instead? Do I need to render to a viewport3d instead? It isn't clear to me how to use all the functionality given some seems to be designed for using the wpf viewport3d control, but it is unclear whether I should be able to use this functionality in the DXScene or not, and if so how that works.
I've not been able to find any documentation that describes this dichotomy in your framework - am I missing something?
Thanks!