/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void VisualBox_Load(object sender, EventArgs e) { VisualBox.MakeCurrent(); Display.ViewPort = new Rectangle(Point.Empty, VisualBox.Size); Display.RenderState.ClearColor = Color.Black; Display.RenderState.Blending = true; Display.BlendingFunction(BlendingFactorSource.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); }
/// <summary> /// /// </summary> void RenderScene() { VisualBox.MakeCurrent(); Display.ClearBuffers(); Batch.Begin(); // Background Batch.DrawTile(Maze.WallTileset, 0, Point.Empty); // Draw decoration if (DecorationSet != null) { DecorationSet.Draw(Batch, PressurePlate.DecorationPrimary, ViewFieldPosition.L); } Batch.End(); VisualBox.SwapBuffers(); }