-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
28 lines (27 loc) · 1.04 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
using System;
using System.Drawing;
using System.Drawing.Imaging;
using DevExpress.XtraCharts.Native;
using DevExpress.XtraCharts.GLGraphics;
namespace OpenGLTester {
class Program {
static void Main(string[] args) {
Size size = new Size(128, 128);
using(Bitmap bmp = new Bitmap(size.Width, size.Height)) {
using(Graphics gr = Graphics.FromImage(bmp)) {
bool result = false;
using(OpenGLGraphics glGraphics = new OpenGLGraphics(gr, IntPtr.Zero, new Rectangle(Point.Empty, size))) {
if(glGraphics.Initialized) {
glGraphics.Execute();
result = true;
}
}
if(result) {
bmp.Save("Test.png", ImageFormat.Png);
PlatformUtils.ConsoleWriteLine("Test.png was created.", ConsoleColor.Green);
}
}
}
}
}
}