google / node-gles

Apache License 2.0
324 stars 32 forks source link

Bug fixes, buffer fixes, and teximage webgl1 support #40

Closed nkreeger closed 5 years ago

nkreeger commented 5 years ago

This PR introduces fixes to bugs discovered when running against all tfjs-core unit tests.

The big fix here is to allow webgl1 texImage2D support and handle non-typed array contents in N-API. To help with buffer allocation, I've introduced a helper class to automatically cleanup buffers as needed w/o the caller needing to do anything.

Pretty heavy on the C++ side so please ping with any questions.

This change is Reviewable