-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow.cs
41 lines (35 loc) · 1.3 KB
/
Window.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
using OpenTK.Windowing.Desktop; // Janela
using OpenTK.Windowing.Common;
using OpenTK.Windowing.Common.Input;
using OpenTK.Mathematics;
using StbImageSharp;
namespace MyGame
{
static class Window
{
public static GameWindowSettings gws = GameWindowSettings.Default;
public static NativeWindowSettings nws = NativeWindowSettings.Default;
static Window()
{
gws = GameWindowSettings.Default;
nws = NativeWindowSettings.Default;
nws.Title = "Game OpenGL";
nws.Location = new Vector2i(100, 100);
nws.Size = new Vector2i(1600, 900);
nws.SrgbCapable = true;
nws.StartFocused = true;
nws.StartVisible = true;
nws.AutoLoadBindings = true;
nws.API = ContextAPI.OpenGL;
nws.APIVersion = Version.Parse("4.6");
nws.Flags = ContextFlags.Default;
nws.WindowState = WindowState.Normal;
nws.Flags = ContextFlags.Debug;
using(Stream stream = File.OpenRead("Resources/img/icon.png"))
{
ImageResult image = ImageResult.FromStream(stream, ColorComponents.RedGreenBlueAlpha);
nws.Icon = new WindowIcon( new Image(image.Width, image.Height, image.Data));
}
}
}
}