Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DeactivatedGlBox_Load(object sender, EventArgs e)
 {
     DeactivatedGlBox.MakeCurrent();
     Display.ViewPort = new Rectangle(Point.Empty, DeactivatedGlBox.Size);
     Display.RenderState.ClearColor = Color.Black;
     Display.RenderState.Blending   = true;
     Display.BlendingFunction(BlendingFactorSource.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
 }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        void RenderDeactivated()
        {
            DeactivatedGlBox.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
            DecorationSet.Draw(Batch, (int)DeactivatedIdBox.Value, ViewFieldPosition.L);

            Batch.End();

            DeactivatedGlBox.SwapBuffers();
        }