opengl 0.5.0 opengl: ^0.5.0 copied to clipboard
OpenGL 4.6 FFI bindings for Dart. Supports Linux, macOS and Windows.
import 'package:opengl/opengl.dart';
void main() {
// create OpenGL context and make it current
//...
// use OpenGL
//...
final result = glGetError();
// glGetError returns GL_NO_ERROR if successful,
// or GL_INVALID_OPERATION = 0x0502 (1282) without context in our case
print('glGetError() is ${result == GL_NO_ERROR ? "GL_NO_ERROR" : result}');
}