You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Simplified "GameWindow" class to emulate WinForms, with similar properties, events, etc.
19
-
</PackageReleaseNotes>
12
+
<PackageReleaseNotes>- Implemented new GLFW 3.3 features
13
+
- Large refactorings
14
+
- Code improvements</PackageReleaseNotes>
20
15
<RepositoryType>GitHub</RepositoryType>
21
16
<PackageTags>GLFW OpenGL OpenGLES ES C# F# VB Csharp CS Windows Mono Linux Mac OSX Context NET Standard Core Framework Game Native Form Cross Platform Unix netcore netstandard dotnet winform</PackageTags>
Copy file name to clipboardExpand all lines: README.md
+20-14
Original file line number
Diff line number
Diff line change
@@ -19,20 +19,6 @@ Complete, cross-platform, managed wrapper around the GLFW library for creating n
19
19
## Getting Started
20
20
The recommended way to use this library is to download the source and include directly within your application, as this offers the highest amount of control over dependency loading. It was build upon [.NET Standard 2.0](https://docs.microsoft.com/en-us/dotnet/standard/net-standard) to target the largest number of platforms and frameworks, and thus you will need to fine-tune the dependency loading to your specific needs (see below).
21
21
22
-
Creating a window is simple.
23
-
```csharp
24
-
using (varwindow=newGameWindow(640, 480, "MyWindowTitle"))
25
-
{
26
-
while (!window.IsClosing)
27
-
{
28
-
// OpenGL rendering
29
-
30
-
window.SwapBuffers();
31
-
Glfw.PollEvents();
32
-
}
33
-
}
34
-
```
35
-
36
22
### .NET Core
37
23
In all platforms utilizing .NET Core, the `AssemblyLoadContext` can be used to resolve native dependencies at runtime, based on platform, architecture, etc.
38
24
@@ -45,5 +31,25 @@ Unix users need only have GLFW built and installed on the system globally, and n
45
31
## IMPORTANT!
46
32
The Windows and Unix library name differ. On Windows, the library name is `glfw3` (always exclude file extensions), and on Unix systems, it is only `glfw` without the major version suffix. By default, the `Glfw.LIBRARY` constant is hard-coded in the Windows format, so this will either need changed, or require you to resolve the dependencies manually.
47
33
34
+
## Native Window Creation
35
+
Once you have your dependencies taken care of, creating a window is simple.
36
+
```csharp
37
+
using (varwindow=newNativeWindow(800, 600, "MyWindowTitle"))
38
+
{
39
+
// Main application loop
40
+
while (!window.IsClosing)
41
+
{
42
+
// OpenGL rendering
43
+
// Implement any timing for flow control, etc (see Glfw.GetTime())
44
+
45
+
// Swap the front/back buffers
46
+
window.SwapBuffers();
47
+
48
+
// Poll native operating system events (must be called or OS will think application is hanging)
49
+
Glfw.PollEvents();
50
+
}
51
+
}
52
+
```
53
+
48
54
## Source Code
49
55
Source code can be found at GitHub: https://github.com/ForeverZer0/glfw-net
0 commit comments