glfw_dart 1.0.0-nullsafety.0 copy "glfw_dart: ^1.0.0-nullsafety.0" to clipboard
glfw_dart: ^1.0.0-nullsafety.0 copied to clipboard

outdated

dart:ffi bindings for GLFW3 library. It connects the glfw3.dll/libglfw3.so library and loads the functions of glfw3.

GLFW Dart #

dart:ffi bindings for GLFW library

Install #

Add this to pubspec.yaml:

dependencies:
  glfw_dart: ^0.2.0

Import it:

import 'package:glfw_dart/glfw3.dart';

Notice #1: .\glfw3.dll or /usr/lib/x86_64-linux-gnu/libglfw.so will be automatically opened.

For manual GLFW initialization:

import 'package:glfw_dart/glfw_dart.dart';
//...
final Glfw glfw = Glfw(customPath: '<path-to-glfw3.dll-file>', vulkan: true);
//...
void main(){
  glfw.init();
  //...
}

Notice #2: It is recommended to specify the path to glfw3.dll:

glfw = Glfw(customPath: Platform.isWindows ? "lib\\glfw3.dll" : null);

If customPath is null dynamic library will be automatically opened (see notice 1)

Alternatives #

Need to do #

  • High level api (with streams, objects)

See also #

gl_dart

0
likes
0
pub points
10%
popularity

Publisher

unverified uploader

dart:ffi bindings for GLFW3 library. It connects the glfw3.dll/libglfw3.so library and loads the functions of glfw3.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

ffi

More

Packages that depend on glfw_dart