protected override void Initialise() { //draw targets usually need a camera. Camera3D camera = new Camera3D(); //look at the sphere, which will be at 0,0,0 camera.LookAt(Vector3.Zero, new Vector3(0, 0, 4), Vector3.UnitY); //create the draw target. drawToScreen = new DrawTargetScreen(this, camera); drawToScreen.ClearBuffer.ClearColour = Color.CornflowerBlue; //create the sphere SphereDrawer sphere = new SphereDrawer(Vector3.Zero); //before adding the sphere, add a rect over half the background to show blending is active //element covers half the screen SolidColourElement element = new SolidColourElement(Color.DarkGray, new Vector2(0.5f, 1), true); //element is added before the sphere (so it draws first) drawToScreen.Add(element); //add it to be drawn to the screen drawToScreen.Add(sphere); }
protected override void Initialise() { //draw targets usually need a camera. Camera3D camera = new Camera3D(); //look at the sphere, which will be at 0,0,0 camera.LookAt(Vector3.Zero, new Vector3(0, 0, 4), Vector3.UnitY); //create the draw target. drawToScreen = new DrawTargetScreen(camera); drawToScreen.ClearBuffer.ClearColour = Color.CornflowerBlue; //create the sphere SphereDrawer sphere = new SphereDrawer(Vector3.Zero); //before adding the sphere, add a rect over half the background to show blending is active //element covers half the screen SolidColourElement element = new SolidColourElement(Color.DarkGray, new Vector2(0.5f, 1), true); //element is added before the sphere (so it draws first) drawToScreen.Add(element); //add it to be drawn to the screen drawToScreen.Add(sphere); }