build_cgo_hack.go 641 B

1234567891011121314151617
  1. //go:build required
  2. // +build required
  3. package gles2
  4. // This file exists purely to prevent the golang toolchain from stripping
  5. // away the c source directories and files when `go mod vendor` is used
  6. // to populate a `vendor/` directory of a project depending on `go-gl/go`.
  7. //
  8. // How it works:
  9. // - every directory which only includes c source files receives a dummy.go file.
  10. // - every directory we want to preserve is included here as a _ import.
  11. // - this file is given a build tag to exclude it from the regular build.
  12. import (
  13. // Prevent go tooling from stripping out the c source files.
  14. _ "github.com/go-gl/gl/v3.1/gles2/KHR"
  15. )