glfw_dart 0.0.1
glfw_dart: ^0.0.1 copied to clipboard
dart:ffi bindings for GLFW3 library. It connects the glfw3.dll/libglfw3.so library and loads the functions of glfw3.
GLFW Dart #
dart:ffi bindings for GLFW library
Install #
Add this to pubspec.yaml:
dependencies:
glfw_dart:
git: https://github.com/armacoty/glfw_dart.git
Import it:
import "package:glfw_dart/glfw3.dart";
Notice #1: .\glfw3.dll or /usr/lib/x86_64-linux-gnu/libglfw.so will be automatically opened.
For manual GLFW initialization:
import "package:glfw_dart/glfw3.dart";
//...
void main(){
glfw = Glfw(
customPath: "<path-to-glfw3.dll-file>"
);
//...
}
Notice #2: It is recommended to specify the path to glfw3.dll:
Example:
import "dart:io";
import "package:glfw_dart/glfw3.dart";
void main(){
glfw = Glfw(customPath: Platform.isWindows ? "lib\\glfw3.dll" : null);
//...
}
Alternatives #
- glfw by gitlab@ext https://pub.dev/packages/glfw (gitlab: https://gitlab.com/ext/dart-glfw)
- google/dart-glfw https://github.com/google/dart-glfw
Need to do #
- Vulkan support
- High level api (with streams, objects)