/// <summary> /// /// </summary> void RenderActivated() { ActivatedGLBox.MakeCurrent(); Display.ClearBuffers(); Batch.Begin(); // Background Batch.DrawTile(Maze.WallTileset, 0, Point.Empty); // Render the walls foreach (TileDrawing tmp in DisplayCoordinates.GetWalls(ViewFieldPosition.L)) { Batch.DrawTile(Maze.WallTileset, tmp.ID, tmp.Location); } // Draw decoration if (DecorationSet != null) { DecorationSet.Draw(Batch, (int)ActivatedIdBox.Value, ViewFieldPosition.L); } Batch.End(); ActivatedGLBox.SwapBuffers(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ActivatedGLBox_Load(object sender, EventArgs e) { ActivatedGLBox.MakeCurrent(); Display.ViewPort = new Rectangle(Point.Empty, ActivatedGLBox.Size); Display.RenderState.ClearColor = Color.Black; Display.RenderState.Blending = true; Display.BlendingFunction(BlendingFactorSource.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); }