예제 #1
0
        public void NullModelDrawnWontThrow()
        {
            var modelRenderer = new ModelRenderer(Resolve <Drawing>());

            Assert.DoesNotThrow(
                () => { modelRenderer.Draw(new List <DrawableEntity>(new Model[] { null })); });
        }
예제 #2
0
        private void ModelViewControl_Paint(object sender, PaintEventArgs e)
        {
            if (!glContextCreated)
            {
                return; //can't do anything with this, heh
            }
            ModelViewControl.MakeCurrent();

            SetupViewport();

            modelRenderer.Pitch           = (PitchTrackBar.Value - 8) * -22.5d;
            modelRenderer.Angle           = (AngleTrackBar.Value - 8) * -22.5d;
            modelRenderer.ShowBBs         = ShowBBCheckBox.Checked;
            modelRenderer.ShowNormals     = ShowNormCheckBox.Checked;
            modelRenderer.Wireframe       = WireframeCheckBox.Checked;
            modelRenderer.ShowRadius      = ShowRadiusCheckBox.Checked;
            modelRenderer.EmulateSoftware = NoDepthCheckBox.Checked;

            modelRenderer.Draw((int)ModelNumSpinner.Value);
            ModelViewControl.SwapBuffers();
        }
예제 #3
0
		public void NullModelDrawnWontThrow()
		{
			var modelRenderer = new ModelRenderer(Resolve<Drawing>());
			Assert.DoesNotThrow(
				() => { modelRenderer.Draw(new List<DrawableEntity>(new Model[] { null })); });
		}