/// <summary> /// Render the decoration scene /// </summary> void RenderDecorationScene() { GlDecorationControl.MakeCurrent(); Display.ClearBuffers(); if (Batch != null && Maze != null) { Batch.Begin(); Batch.DrawTile(Maze.WallTileset, 0, Point.Empty); TileDrawing td = DisplayCoordinates.GetWalls(ViewFieldPosition.L)[0]; Batch.DrawTile(Maze.WallTileset, td.ID, td.Location); // Draw the decoration if (Maze.Decoration != null) { Maze.Decoration.Draw(Batch, (int)DecorationIdBox.Value, ViewFieldPosition.L); } Batch.End(); } GlDecorationControl.SwapBuffers(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GlDecorationControl_Load(object sender, EventArgs e) { GlDecorationControl.MakeCurrent(); Display.Init(); Batch = new SpriteBatch(); ChangeDecoration(); UpdateDecorationBoxes(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GlDecorationControl_Resize(object sender, EventArgs e) { GlDecorationControl.MakeCurrent(); Display.ViewPort = new Rectangle(Point.Empty, GlDecorationControl.Size); }