go-gl / gl

Go bindings for OpenGL (generated via glow)
MIT License
1.09k stars 73 forks source link

Regenerate with KHR header and overloads #135

Closed dertseha closed 3 years ago

dertseha commented 3 years ago

This PR extends go-gl/gl in the following ways:

Regenerate with KHR header As identified in go-gl/gl comment , newest API specs all require the presence of KHR/khrplatform.h. glow was extended to download and provide this file as well, and this PR is the result of re-generating all APIs.

Fixes #125 .

checkptr problem fixes As a side-effect of the re-generation, the previously introduced "overloads" feature is now also included.

To highlight the issue with checkptr detector, README.md was extended to detail what to do in such error cases.

Fixes #124 . Should also handle #80 - though I don't think reported affected functions have a necessary overload.

Module A module file was added to allow go-gl/gl to be used outside a GOPATH environment. Futhermore, the code generation call to glow was extended to specify all paths, in order to allow glow also to be used outside GOPATH. (This change is in tandem with the corresponding PR go-gl/glow#115 .)

Detail: The minimum version was set to be Go 1.9. Although Travis build did specify 1.4 to be the earliest, this version could not be brought to work: The linker rejected the passed parameters (/usr/bin/ld: -r and -pie may not be used together). Version 1.9 was chosen because generated CGo code was not compatible with older versions when run with a 1.16 compiler (_cgo_gotypes.go:32:6: type aliases only supported as of -lang=go1.9)

Should help to get going with #102 .

Change of CI Travis was dropped, and instead GitHub actions are in use now. This allows for a more complete test-matrix of multiple Go versions and environments.

It is likely that Travis would also support such test matrices, yet GitHub actions are more readily available - also for forks. This made testing for me easier. I'm happy to provide corresponding changes to the other repositories as well.

errcw commented 3 years ago

🎉 Thanks!