mxpc5396971
mxpc5396971
关注数: 6
粉丝数: 0
发帖数: 269
关注贴吧数: 8
请问下XNA的LoadContent()和Initialize()为什么不执行 添加了组件后,组件的Update和Draw方法执行 ,LoadContent()和Initialize()为什么不执行?我是新手,可能浮浅,不要介意,万望告知。
请问哪里有问题,提示版本冲突,用的是dx9.0c using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using Microsoft.DirectX; using Microsoft.DirectX.Direct3D; namespace mygame { public partial class MainForm : Form { public Device device; public void inintialize_dx() { try { PresentParameters presentParams = new PresentParameters(); presentParams.Windowed = true; presentParams.SwapEffect = SwapEffect.Discard; device = new Device(0,DeviceType.Hardware,this,CreateFlags.SoftwareVertexProcessing,presentParams); } catch(DirectXException e) { MessageBox.Show(e.ToString(),"Error"); } } public MainForm() { InitializeComponent(); inintialize_dx(); } public void draw() { if(device == null) return; device.Clear(ClearFlags.Target,Color.Black,1.0f,0); device.BeginScene(); device.EndScene(); device.Present(); } } } ide提示的是版本冲突。Found conflicts between different versions of the same dependent assembly. (MSB3247)
1
下一页