/// <summary> /// Returns an XMesh object that contains the data from a specified .X file. /// </summary> /// <param name="path"></param> /// <returns></returns> public XMesh Open(string path) { XMesh mesh = new XMesh(); mesh.Load(path, this); return(mesh); }
/// <summary> /// Create Direct3D device and swap chain /// </summary> protected void InitDevice() { device = D3DDevice.CreateDeviceAndSwapChain(directControl.Handle, out swapChain); SetViews(); meshManager = new XMeshManager(device); mesh = meshManager.Open("Media\\Tiger\\tiger.x"); InitMatrices(); }
private void LoadMesh(string filename) { lock (meshLock) { if (mesh != null) { mesh.Dispose(); mesh = null; } worldMatrix = Matrix4x4F.Identity; XMesh meshT = meshManager.Open(filename); meshT.ShowWireFrame = cbWireframe.Checked; mesh = meshT; }; }
/// <summary> /// Create Direct3D device and swap chain /// </summary> public void InitDevice() { device = D3DDevice.CreateDeviceAndSwapChain(host.Handle); swapChain = device.SwapChain; SetViews(); meshManager = new XMeshManager(device); mesh = meshManager.Open("Media\\Tiger\\tiger.x"); InitMatrices(); needsResizing = false; }