Exemple #1
0
        public void Render(SimpleRenderer renderer)
        {
            UpdateFrameCount();
#if TEXT_RENDERER
            textRenderer.DrawText(FramesPerSecond.ToString("####.00") + " FPS", this.Position);
#endif
        }
Exemple #2
0
 private void ThreadStartFunc(object obj)
 {
     renderer = new SimpleRenderer();
     renderer.Form.MouseDown   += OnMouseDown;
     renderer.Form.FormClosing += OnFormClosing;
     this.active = true;
     Application.Run(renderer.Form);
 }
Exemple #3
0
        public void Render(SimpleRenderer renderer)
        {
            var inputAssembler = renderer.DeviceContext.InputAssembler;

            inputAssembler.PrimitiveTopology = SharpDX.Direct3D.PrimitiveTopology.TriangleList;
            inputAssembler.SetVertexBuffers(0, new VertexBufferBinding(VertexBuffer, SimpleVertex.Size, 0));
            inputAssembler.SetIndexBuffer(IndexBuffer, SharpDX.DXGI.Format.R32_UInt, 0);
            renderer.DeviceContext.DrawIndexed(indexCount, 0, 0);
        }
Exemple #4
0
 private void ThreadStartFunc(object obj)
 {
     renderer = new SimpleRenderer();
     renderer.Form.MouseDown += OnMouseDown;
     renderer.Form.FormClosing += OnFormClosing;
     this.active = true;
     Application.Run(renderer.Form);
 }