glfw 0.2.2
glfw: ^0.2.2 copied to clipboard
GLFW 3.3 FFI bindings for Dart. Supports Windows and Linux desktops.
example/example.dart
import 'dart:ffi';
import 'package:ffi_utils/ffi_utils.dart';
import 'package:glfw/glfw.dart';
void main() {
initGlfw();
glfwInit();
print('GLFW: ${NativeString.fromPointer(glfwGetVersionString())}');
var window = glfwCreateWindow(
640, 480,
NativeString.fromString('Dart FFI + GLFW'),
nullptr.cast(), nullptr.cast());
while (glfwWindowShouldClose(window) != GLFW_TRUE) {
glfwSwapBuffers(window);
glfwPollEvents();
}
}