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

outdated

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';
import 'package:glfw/src/glfw_init.dart';

void main() {
  initGlfw();

  glfwInit();
  print('GLFW: ${NativeString.fromPointer(glfwGetVersionString())}');
    
  var window = glfwCreateWindow(
    640, 480,
    NativeString.fromString('Dart FFI + GLFW + OpenGL'), 
    nullptr.cast(), nullptr.cast());

  while (glfwWindowShouldClose(window) != GLFW_TRUE)
  {
      glfwSwapBuffers(window);
      glfwPollEvents();
  }
}
8
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

GLFW 3.3 FFI bindings for Dart. Supports Windows and Linux desktops.

Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

ffi_utils

More

Packages that depend on glfw