} // end of Update() public void Render(Camera camera) { if (Active) { renderObj.Render(camera); } } // end of Render()
/// <summary> /// Render this distortion pulse to the current offscreen /// Assumes the proper InGame.inGame.renderEffects is setup /// </summary> /// <param name="camera"></param> /// <param name="effectsImage"></param> public void RenderSM3(Camera camera, Texture2D effectsImage) { if (effect != null) { Matrix preWorld = Matrix.CreateScale(scale); Parameter(EffectParams.DepthTexture).SetValue(effectsImage); Parameter(EffectParams.PreWorld).SetValue(preWorld); Parameter(EffectParams.Opacity).SetValue(scales * opacity); if (bump != null) { SetupBump(camera); } if (Bloom) { Parameter(EffectParams.BloomColor).SetValue(bumpTint); } RenderObj.Render(camera); Parameter(EffectParams.PreWorld).SetValue(Matrix.Identity); } }
/// <summary> /// Render this section of road/wall /// </summary> /// <param name="camera"></param> public void Render(Camera camera) { if (RenderObj != null) { Frustum.CullResult cull = camera.Frustum.CullTest(Sphere); if (cull != Frustum.CullResult.TotallyOutside) { RenderObj.Render(camera, Road); } } }
/// <summary> /// Render this object's SM2 glow to the screen. /// </summary> /// <param name="camera"></param> public void RenderBloomSM2(Camera camera) { if (effect != null) { Matrix preWorld = Matrix.CreateScale(scale); Parameter(EffectParams.PreWorld).SetValue(preWorld); Parameter(EffectParams.Opacity).SetValue(scales * opacity); Parameter(EffectParams.BloomColor).SetValue(bumpTint); Debug.Assert(Bloom, "No other reason for rendering in SM2"); RenderObj.Render(camera); Parameter(EffectParams.PreWorld).SetValue(Matrix.Identity); } }
/// <summary> /// Hacked render call to help make the WinRT startup look better. /// </summary> public void Render() { renderObj.UnloadContent(); renderObj.LoadContent(true); renderObj.Render(null); }
void VideoOutputDeal(object sender, EventArgs e) { RenderObj.Render(); }
public static void Render(Camera camera, Matrix l2w, bool cone, Vector4 diffuse) { RenderObj.Render(camera, l2w, cone, diffuse); }