git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1104 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
42
OpenRa.Game/MainWindow.cs
Normal file
42
OpenRa.Game/MainWindow.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using BluntDirectX.Direct3D;
|
||||
|
||||
namespace OpenRa.Game
|
||||
{
|
||||
class MainWindow : Form
|
||||
{
|
||||
GraphicsDevice device;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
Text = "OpenRA";
|
||||
ClientSize = new Size(640, 480);
|
||||
|
||||
Visible = true;
|
||||
|
||||
device = GraphicsDevice.Create(this, ClientSize.Width, ClientSize.Height, true, false);
|
||||
}
|
||||
|
||||
internal void Run()
|
||||
{
|
||||
while (Created && Visible)
|
||||
{
|
||||
Frame();
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
|
||||
void Frame()
|
||||
{
|
||||
device.Begin();
|
||||
device.Clear(0);
|
||||
|
||||
device.End();
|
||||
device.Present();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user