public void Render(DrawOptions options, bool recording = false) { using (new GLEnableCap(EnableCap.Texture2D)) { UpdateBuffers(); GL.BlendFunc( BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); GameDrawingMatrix.Enter(); _physvbo.Scale = options.Zoom; _physvbo.KnobState = options.KnobState; _sceneryvbo.Scale = options.Zoom; //green lines dont get lifelock if (options.KnobState != KnobState.Hidden) { _sceneryvbo.KnobState = KnobState.Shown; } else { _sceneryvbo.KnobState = KnobState.Hidden; } if ((Settings.PreviewMode || recording) && !(recording && !Settings.Recording.EnableColorTriggers)) { _sceneryvbo.OverrideColor = game.Track.Timeline.GetFrameLineColor(game.Track.Offset); _physvbo.OverrideColor = game.Track.Timeline.GetFrameLineColor(game.Track.Offset); } else { _sceneryvbo.OverrideColor = (Settings.NightMode ? Constants.DefaultNightLineColor : Constants.DefaultLineColor); _physvbo.OverrideColor = (Settings.NightMode ? Constants.DefaultNightLineColor : Constants.DefaultLineColor); } if (options.LineColors) { _sceneryvbo.OverrideColor = Constants.SceneryLineColor; _sceneryvbo.OverridePriority = 1; _physvbo.OverridePriority = 1; } else { _sceneryvbo.OverridePriority = 255;//force override _physvbo.OverridePriority = 255; } _physvbo.Overlay = options.Overlay; _sceneryvbo.Overlay = options.Overlay; _sceneryvbo.Draw(); _decorator.DrawUnder(options); _physvbo.Draw(); GameDrawingMatrix.Exit(); } }
public void Render(DrawOptions options) { using (new GLEnableCap(EnableCap.Texture2D)) { UpdateBuffers(); GL.BlendFunc( BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); GameDrawingMatrix.Enter(); _physvbo.Scale = options.Zoom; _physvbo.KnobState = options.KnobState; _sceneryvbo.Scale = options.Zoom; //green lines dont get lifelock if (options.KnobState != KnobState.Hidden) { _sceneryvbo.KnobState = KnobState.Shown; } else { _sceneryvbo.KnobState = KnobState.Hidden; } if (options.NightMode) { _sceneryvbo.OverrideColor = Constants.DefaultNightLineColor; _physvbo.OverrideColor = Constants.DefaultNightLineColor; } else { _sceneryvbo.OverrideColor = Constants.DefaultLineColor; _physvbo.OverrideColor = Constants.DefaultLineColor; } if (options.LineColors) { _sceneryvbo.OverrideColor = Constants.SceneryLineColor; _sceneryvbo.OverridePriority = 1; _physvbo.OverridePriority = 1; } else { _sceneryvbo.OverridePriority = 255;//force override _physvbo.OverridePriority = 255; } _physvbo.Overlay = options.Overlay; _sceneryvbo.Overlay = options.Overlay; _sceneryvbo.Draw(); _decorator.DrawUnder(options); _physvbo.Draw(); GameDrawingMatrix.Exit(); } }