-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
executable file
·44 lines (41 loc) · 1.26 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using SharpDX;
using SharpDX.Direct2D1;
using SharpDX.DXGI;
using SharpDX.Windows;
using Game.GCore;
namespace Game
{
static class Program
{
public static GraphicCore core;
private static System.Object lockThis = new System.Object();
[STAThread]
private static void run()
{
Game game = new Game();
}
private static void Main()
{
core = GraphicCore.getInstance();
run();
var brush = new SolidColorBrush(core.render2d, Color.Gold);
RenderLoop.Run(core.form, () =>
{
if (core.running)
{
core.render2d.BeginDraw();
core.render2d.Clear(Color.Black);
GraphicCore.MCOUNT = 0;
core.render(Game.background, RenderType.BACKGROUND);
core.render(Game.stage, RenderType.STAGE);
core.render(Game.interfaceView, RenderType.INTERFACE);
core.render2d.EndDraw();
GraphicCore.TOTAL_COUNT = GraphicCore.MCOUNT;
core.swapChain.Present(0, PresentFlags.None);
}
});
core.Dispose();
}
}
}