简体   繁体   English

WPF中的XNA动画

[英]XNA animation inside WPF

My question is it possible to do play XNA animation inside WPF ? 我的问题是可以在WPF中播放XNA动画吗? and how can I achieve this ? 我该如何实现呢?
I did little searching and found that it's possible with Winform but I need to do it in WPF as my whole project is in wpf and only this issue is what's left. 我进行了很少的搜索,发现Winform可以实现此功能,但是我需要在WPF中执行此操作,因为我的整个项目都在wpf中,只剩下这个问题了。
Update : 更新
Here's the source I'm using. 这是我正在使用的来源。 https://xnamodelviewer.codeplex.com/ https://xnamodelviewer.codeplex.com/
Update 2 : 更新2
I tried using a naive way which is putting the initialization of animationplayer & animationclips in the draw function and updating it in the update function which requires gameTime (not available) so I used instead a stopwatch to achieve the same thing but the model didn't do any animation. 我尝试使用一种幼稚的方法,将animationplayer和animationclips的初始化放在draw函数中,并在需要gameTime(不可用)的update函数中对其进行更新,所以我改用秒表来实现相同的功能,但模型没有做任何动画。

因此,经过一段时间修改WPF和XNA并切换到此处说明的另一种方法http://blogs.msdn.com/b/nicgrave/archive/2010/07/25/rendering-with-xna-framework-4-0-inside -of-a-wpf-application.aspx仍然无法播放动画(它删除了WPF中的托管winform),所以我决定切换到winform(不再使用wpf)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM