Ejemplo n.º 1
0
    public GameWindow()
    {
        Text = "Game";

        ShowIcon = false;
        //ShowInTaskbar = false;

        MaximizeBox = false;

        StartPosition = FormStartPosition.CenterScreen;
        //FormBorderStyle = FormBorderStyle.FixedSingle;

        /*set the client size by default to 80% of screen size*/
        Screen screen     = Screen.FromPoint(Cursor.Position);
        Size   screenSize = screen.Bounds.Size;

        ClientSize = new Size(
            (int)(screenSize.Width * 0.8f),
            (int)(screenSize.Height * 0.8f));


        /*setup renderer*/
        p_Renderer = RenderFactory.CreateRenderer();
        RecreateContext();
    }
Ejemplo n.º 2
0
    public void RecreateContext()
    {
        if (p_Context != null)
        {
            p_Context.Dispose();
        }

        p_Renderer = RenderFactory.CreateRenderer();
        p_Context  = RenderFactory.CreateContext(Handle);
    }