glfw 0.2.4
glfw: ^0.2.4 copied to clipboard
GLFW 3.3.4 FFI bindings for Dart. Supports Linux and Windows.
example/example.dart
import 'dart:ffi';
import 'package:ffi/ffi.dart';
import 'package:glfw/glfw.dart';
void main() {
initGlfw();
glfwInit();
print('GLFW: ${Utf8.fromUtf8(glfwGetVersionString().cast<Utf8>())}');
var window = glfwCreateWindow(
640, 480,
Utf8.toUtf8('Dart FFI + GLFW'),
nullptr.cast(), nullptr.cast());
while (glfwWindowShouldClose(window) != GLFW_TRUE) {
glfwSwapBuffers(window);
glfwPollEvents();
}
}
copied to clipboard