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

outdated

OpenGL 4.6 FFI bindings for Dart. Supports Windows and Linux desktops.

example/example.dart

import 'package:opengl/opengl.dart';
import 'package:opengl/src/opengl_init.dart';

void main() {
  // create OpenGL context and make it current
  //...

  // load OpenGL dynamic library and init all its functions
  initOpenGL();

  // use OpenGL
  //...
  var result = glGetError();

  // glGetError returns GL_NO_ERROR if successful, 
  // or GL_INVALID_OPERATION = 0x0502 (1282) without context in our case
  print('glGetError() result is ${result == GL_NO_ERROR ? "GL_NO_ERROR" : result}');
}
31
likes
0
pub points
55%
popularity

Publisher

unverified uploader

OpenGL 4.6 FFI bindings for Dart. Supports Windows and Linux desktops.

Repository (GitLab)
View/report issues

License

unknown (LICENSE)

Dependencies

ffi_utils, glfw

More

Packages that depend on opengl