static void Main() { #if DEBUG // Enable object tracking SharpDX.Configuration.EnableObjectTracking = true; #endif // Create the form to render to var form = new Form1(); form.Text = "D3DRendering - Physics Simulation"; form.ClientSize = new System.Drawing.Size(640, 480); form.Show(); // Create and initialize the new D3D application // Then run the application. using (D3DApp app = new D3DApp(form)) { // Only render frames at the maximum rate the // display device can handle. app.VSync = true; // Initialize the framework (creates Direct3D device etc) app.Initialize(); // Run the application app.Run(); } }
static void Main(string[] _) { var window = SampleLib.Window.Create(); if (window == null) { throw new Exception("fail to create window"); } using (var d3d = new D3DApp()) { window.OnResize += (w, h) => { d3d.Resize(window.WindowHandle, w, h); }; SampleLib.MessageLoop.Run(() => { d3d.Draw(window.WindowHandle); }, 30); } }
static void Main() { var form = new Form1(); form.Text = "D3DRendering - Primitives"; form.ClientSize = new System.Drawing.Size(640, 480); form.Show(); using (var app3D = new D3DApp(form)) { // render frames at max rate app3D.VSync = true; //Initialize framework app3D.Initialize(); // Render loop app3D.Run(); } }
/// <summary> /// Initializes a new instance of the <see cref="ThreadMessageFilter"/> class. /// </summary> /// <param name="owner">The owner.</param> public ThreadMessageFilter(D3DApp owner) { this.owner = owner; }
public void SetWindow(Windows.UI.Core.CoreWindow window) { RemoveAndDispose(ref d3dApp); this.window = window; d3dApp = ToDispose(new D3DApp(window)); d3dApp.Initialize(); }