public override void Render() { ShadowMapping.SetupShadows(world, 0, true); GL.Clear(ClearFlags); camera.SetFPSCamera(); // render scene to colorFBO world.RenderSceneWithParticles(colorFBO); colorFBO.BindFBO(); lightImg.RenderBillboard(Light.Lights[0].Position, 0, 100, true); colorFBO.UnBindFBO(); Camera.Set2D(); { PostEffect.Begin(colorFBO); if (Keyboard[Key.R]) { blurH.RenderEffect(); blurV.RenderEffect(); } if (Keyboard[Key.T]) { bloom.RenderEffect(); } PostEffect.End().DrawFullScreen(0, 0); font.Write("Soft particles + effects (press R / T)"); } Camera.Set3D(); base.Render(); }
public override void Render() { ShadowMapping.SetupShadows(world, 0, false); GL.Clear(ClearFlags); camera.SetFPSCamera(); world.Render(); if (Keyboard[Key.Space]) { AnimatedModel self = actors[0] as AnimatedModel; self.RenderSkeleton(); // note: ei näy gl3:ssa } lightImg.RenderBillboard(Light.Lights[0].Position, 0, 50, true); Camera.Set2D(); font.Write("Arrow keys: move the ugly.\n" + (Settings.UseGL3 == false ? "Space: show skeleton.\n" : "") + "A,D,W,S: move the camera.\nHold left mouse button to rotate the camera.", 0, 0); Camera.Set3D(); base.Render(); }