google / dart-gl

OpenGL ES 2.0 Dart Native Extension
BSD 3-Clause "New" or "Revised" License
91 stars 17 forks source link

Changed the definitions for GL_TRUE/GL_FALSE to integers 1/0 #6

Closed mmclenna closed 8 years ago

mmclenna commented 8 years ago

This makes everything consistent with the C Language bindings for OpenGL. The boolean values were causing problems when passed into functions like glfwSetWindowShouldClose(), which is faithful to the C Language style. Kept boolean return values, however, so it's easier in Dart to use the result of a function in an if-test or logical operation (without having to add != 0 everywhere).

Updated the generator code to support different input/return value maps, and made "bool" map to integer as an input, and map to "bool" as an output. Only a few generated bindings were affected.