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