public void NullModelDrawnWontThrow() { var modelRenderer = new ModelRenderer(Resolve <Drawing>()); Assert.DoesNotThrow( () => { modelRenderer.Draw(new List <DrawableEntity>(new Model[] { null })); }); }
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(); }
public void NullModelDrawnWontThrow() { var modelRenderer = new ModelRenderer(Resolve<Drawing>()); Assert.DoesNotThrow( () => { modelRenderer.Draw(new List<DrawableEntity>(new Model[] { null })); }); }