glfw 0.3.1 copy "glfw: ^0.3.1" to clipboard
glfw: ^0.3.1 copied to clipboard

outdated

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: ${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!();
  }
}
8
likes
0
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

GLFW 3.3.4 FFI bindings for Dart. Supports Linux and Windows.

Repository (GitLab)
View/report issues

License

unknown (license)

More

Packages that depend on glfw