From 07e5d0ea2e711e870c9f24e8db9931cae7264e11 Mon Sep 17 00:00:00 2001 From: myaaaaaaaaa <103326468+myaaaaaaaaa@users.noreply.github.com> Date: Sat, 21 Oct 2023 03:11:12 -0400 Subject: [PATCH] Remove `$PATH/glow` requirement for running `go generate` (#158) --- README.md | 2 -- all-core/gl/KHR/dummy.go | 1 + all-core/gl/build_cgo_hack.go | 1 + all-core/gl/conversions.go | 6 +++--- all-core/gl/package.go | 2 +- all-core/gl/procaddr.go | 10 +++++----- generate.go | 1 + v2.1/gl/KHR/dummy.go | 1 + v2.1/gl/build_cgo_hack.go | 1 + v2.1/gl/conversions.go | 6 +++--- v2.1/gl/package.go | 2 +- v2.1/gl/procaddr.go | 10 +++++----- v3.0/gles2/conversions.go | 6 +++--- v3.0/gles2/package.go | 2 +- v3.0/gles2/procaddr.go | 10 +++++----- v3.1/gles2/KHR/dummy.go | 1 + v3.1/gles2/build_cgo_hack.go | 1 + v3.1/gles2/conversions.go | 6 +++--- v3.1/gles2/package.go | 2 +- v3.1/gles2/procaddr.go | 10 +++++----- v3.2-compatibility/gl/KHR/dummy.go | 1 + v3.2-compatibility/gl/build_cgo_hack.go | 1 + v3.2-compatibility/gl/conversions.go | 6 +++--- v3.2-compatibility/gl/package.go | 2 +- v3.2-compatibility/gl/procaddr.go | 10 +++++----- v3.2-core/gl/KHR/dummy.go | 1 + v3.2-core/gl/build_cgo_hack.go | 1 + v3.2-core/gl/conversions.go | 6 +++--- v3.2-core/gl/package.go | 2 +- v3.2-core/gl/procaddr.go | 10 +++++----- v3.3-compatibility/gl/KHR/dummy.go | 1 + v3.3-compatibility/gl/build_cgo_hack.go | 1 + v3.3-compatibility/gl/conversions.go | 6 +++--- v3.3-compatibility/gl/package.go | 2 +- v3.3-compatibility/gl/procaddr.go | 10 +++++----- v3.3-core/gl/KHR/dummy.go | 1 + v3.3-core/gl/build_cgo_hack.go | 1 + v3.3-core/gl/conversions.go | 6 +++--- v3.3-core/gl/package.go | 2 +- v3.3-core/gl/procaddr.go | 10 +++++----- v4.1-compatibility/gl/KHR/dummy.go | 1 + v4.1-compatibility/gl/build_cgo_hack.go | 1 + v4.1-compatibility/gl/conversions.go | 6 +++--- v4.1-compatibility/gl/package.go | 2 +- v4.1-compatibility/gl/procaddr.go | 10 +++++----- v4.1-core/gl/KHR/dummy.go | 1 + v4.1-core/gl/build_cgo_hack.go | 1 + v4.1-core/gl/conversions.go | 6 +++--- v4.1-core/gl/package.go | 2 +- v4.1-core/gl/procaddr.go | 10 +++++----- v4.2-compatibility/gl/KHR/dummy.go | 1 + v4.2-compatibility/gl/build_cgo_hack.go | 1 + v4.2-compatibility/gl/conversions.go | 6 +++--- v4.2-compatibility/gl/package.go | 2 +- v4.2-compatibility/gl/procaddr.go | 10 +++++----- v4.2-core/gl/KHR/dummy.go | 1 + v4.2-core/gl/build_cgo_hack.go | 1 + v4.2-core/gl/conversions.go | 6 +++--- v4.2-core/gl/package.go | 2 +- v4.2-core/gl/procaddr.go | 10 +++++----- v4.3-compatibility/gl/KHR/dummy.go | 1 + v4.3-compatibility/gl/build_cgo_hack.go | 1 + v4.3-compatibility/gl/conversions.go | 6 +++--- v4.3-compatibility/gl/package.go | 2 +- v4.3-compatibility/gl/procaddr.go | 10 +++++----- v4.3-core/gl/KHR/dummy.go | 1 + v4.3-core/gl/build_cgo_hack.go | 1 + v4.3-core/gl/conversions.go | 6 +++--- v4.3-core/gl/package.go | 2 +- v4.3-core/gl/procaddr.go | 10 +++++----- v4.4-compatibility/gl/KHR/dummy.go | 1 + v4.4-compatibility/gl/build_cgo_hack.go | 1 + v4.4-compatibility/gl/conversions.go | 6 +++--- v4.4-compatibility/gl/package.go | 2 +- v4.4-compatibility/gl/procaddr.go | 10 +++++----- v4.4-core/gl/KHR/dummy.go | 1 + v4.4-core/gl/build_cgo_hack.go | 1 + v4.4-core/gl/conversions.go | 6 +++--- v4.4-core/gl/package.go | 2 +- v4.4-core/gl/procaddr.go | 10 +++++----- v4.5-compatibility/gl/KHR/dummy.go | 1 + v4.5-compatibility/gl/build_cgo_hack.go | 1 + v4.5-compatibility/gl/conversions.go | 6 +++--- v4.5-compatibility/gl/package.go | 2 +- v4.5-compatibility/gl/procaddr.go | 10 +++++----- v4.5-core/gl/KHR/dummy.go | 1 + v4.5-core/gl/build_cgo_hack.go | 1 + v4.5-core/gl/conversions.go | 6 +++--- v4.5-core/gl/package.go | 2 +- v4.5-core/gl/procaddr.go | 10 +++++----- v4.6-compatibility/gl/KHR/dummy.go | 1 + v4.6-compatibility/gl/build_cgo_hack.go | 1 + v4.6-compatibility/gl/conversions.go | 6 +++--- v4.6-compatibility/gl/package.go | 2 +- v4.6-compatibility/gl/procaddr.go | 10 +++++----- v4.6-core/gl/KHR/dummy.go | 1 + v4.6-core/gl/build_cgo_hack.go | 1 + v4.6-core/gl/conversions.go | 6 +++--- v4.6-core/gl/package.go | 2 +- v4.6-core/gl/procaddr.go | 10 +++++----- 100 files changed, 219 insertions(+), 182 deletions(-) diff --git a/README.md b/README.md index 2b84a4c..4919488 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,6 @@ It is required to have `glow` source in a sibling directory to `go-gl/gl` since For non-module-aware cases, this means `glow` needs to be in the same Go workspace as `go-gl/gl`. For module-aware cases, `go-gl/glow` needs to be checked out parallel to `go-gl/gl`. -In either case, the `glow` binary must be in your `$PATH`. Doable with `go get -u github.com/go-gl/glow` if your `$GOPATH/bin` is in your `$PATH`. - Perform generation with the following: ```bash diff --git a/all-core/gl/KHR/dummy.go b/all-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/all-core/gl/KHR/dummy.go +++ b/all-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/all-core/gl/build_cgo_hack.go b/all-core/gl/build_cgo_hack.go index d9a5508..2370539 100644 --- a/all-core/gl/build_cgo_hack.go +++ b/all-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/all-core/gl/conversions.go b/all-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/all-core/gl/conversions.go +++ b/all-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/all-core/gl/package.go b/all-core/gl/package.go index 8177393..3062940 100644 --- a/all-core/gl/package.go +++ b/all-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/all-core/gl/procaddr.go b/all-core/gl/procaddr.go index d9324e5..4bcc6b2 100644 --- a/all-core/gl/procaddr.go +++ b/all-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcoreall(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcoreall(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcoreall(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcoreall(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcoreall(cname) + return C.GlowGetProcAddress(cname) } diff --git a/generate.go b/generate.go index 70fd47f..0ebfc79 100644 --- a/generate.go +++ b/generate.go @@ -1,5 +1,6 @@ // +build gen +//go:generate -command glow go run ../glow/ //go:generate glow generate -out=./v2.1/gl/ -api=gl -version=2.1 -xml=../glow/xml/ -tmpl=../glow/tmpl/ //go:generate glow generate -out=./all-core/gl/ -api=gl -version=all -profile=core -lenientInit -xml=../glow/xml/ -tmpl=../glow/tmpl/ //go:generate glow generate -out=./v3.2-core/gl/ -api=gl -version=3.2 -profile=core -xml=../glow/xml/ -tmpl=../glow/tmpl/ diff --git a/v2.1/gl/KHR/dummy.go b/v2.1/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v2.1/gl/KHR/dummy.go +++ b/v2.1/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v2.1/gl/build_cgo_hack.go b/v2.1/gl/build_cgo_hack.go index 86f117b..55c1130 100644 --- a/v2.1/gl/build_cgo_hack.go +++ b/v2.1/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v2.1/gl/conversions.go b/v2.1/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v2.1/gl/conversions.go +++ b/v2.1/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v2.1/gl/package.go b/v2.1/gl/package.go index 0bead5a..5cb742a 100644 --- a/v2.1/gl/package.go +++ b/v2.1/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v2.1/gl/procaddr.go b/v2.1/gl/procaddr.go index 0b511ea..4bcc6b2 100644 --- a/v2.1/gl/procaddr.go +++ b/v2.1/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_gl21(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_gl21(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_gl21(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_gl21(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_gl21(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v3.0/gles2/conversions.go b/v3.0/gles2/conversions.go index 2c12c18..17cceb8 100644 --- a/v3.0/gles2/conversions.go +++ b/v3.0/gles2/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v3.0/gles2/package.go b/v3.0/gles2/package.go index fd4079d..2acfed9 100644 --- a/v3.0/gles2/package.go +++ b/v3.0/gles2/package.go @@ -12,8 +12,8 @@ // Package gles2 implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gles2 // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v3.0/gles2/procaddr.go b/v3.0/gles2/procaddr.go index 3507a0d..23889c2 100644 --- a/v3.0/gles2/procaddr.go +++ b/v3.0/gles2/procaddr.go @@ -33,7 +33,7 @@ package gles2 #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_gles230(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gles2 #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_gles230(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gles2 #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_gles230(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_gles230(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_gles230(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v3.1/gles2/KHR/dummy.go b/v3.1/gles2/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v3.1/gles2/KHR/dummy.go +++ b/v3.1/gles2/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v3.1/gles2/build_cgo_hack.go b/v3.1/gles2/build_cgo_hack.go index 7b09de5..440860e 100644 --- a/v3.1/gles2/build_cgo_hack.go +++ b/v3.1/gles2/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gles2 diff --git a/v3.1/gles2/conversions.go b/v3.1/gles2/conversions.go index 2c12c18..17cceb8 100644 --- a/v3.1/gles2/conversions.go +++ b/v3.1/gles2/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v3.1/gles2/package.go b/v3.1/gles2/package.go index 29f277b..f7e5524 100644 --- a/v3.1/gles2/package.go +++ b/v3.1/gles2/package.go @@ -12,8 +12,8 @@ // Package gles2 implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gles2 // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v3.1/gles2/procaddr.go b/v3.1/gles2/procaddr.go index f543dbe..23889c2 100644 --- a/v3.1/gles2/procaddr.go +++ b/v3.1/gles2/procaddr.go @@ -33,7 +33,7 @@ package gles2 #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_gles231(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gles2 #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_gles231(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gles2 #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_gles231(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_gles231(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_gles231(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v3.2-compatibility/gl/KHR/dummy.go b/v3.2-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v3.2-compatibility/gl/KHR/dummy.go +++ b/v3.2-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v3.2-compatibility/gl/build_cgo_hack.go b/v3.2-compatibility/gl/build_cgo_hack.go index dbd21b5..626fe4d 100644 --- a/v3.2-compatibility/gl/build_cgo_hack.go +++ b/v3.2-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v3.2-compatibility/gl/conversions.go b/v3.2-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v3.2-compatibility/gl/conversions.go +++ b/v3.2-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v3.2-compatibility/gl/package.go b/v3.2-compatibility/gl/package.go index 87a33c9..815b1a4 100644 --- a/v3.2-compatibility/gl/package.go +++ b/v3.2-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v3.2-compatibility/gl/procaddr.go b/v3.2-compatibility/gl/procaddr.go index e0fb0a0..4bcc6b2 100644 --- a/v3.2-compatibility/gl/procaddr.go +++ b/v3.2-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility32(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility32(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility32(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility32(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility32(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v3.2-core/gl/KHR/dummy.go b/v3.2-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v3.2-core/gl/KHR/dummy.go +++ b/v3.2-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v3.2-core/gl/build_cgo_hack.go b/v3.2-core/gl/build_cgo_hack.go index 40a3612..fde605f 100644 --- a/v3.2-core/gl/build_cgo_hack.go +++ b/v3.2-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v3.2-core/gl/conversions.go b/v3.2-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v3.2-core/gl/conversions.go +++ b/v3.2-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v3.2-core/gl/package.go b/v3.2-core/gl/package.go index 70d0ce1..a55c17f 100644 --- a/v3.2-core/gl/package.go +++ b/v3.2-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v3.2-core/gl/procaddr.go b/v3.2-core/gl/procaddr.go index fc9ccf0..4bcc6b2 100644 --- a/v3.2-core/gl/procaddr.go +++ b/v3.2-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore32(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore32(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore32(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore32(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore32(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v3.3-compatibility/gl/KHR/dummy.go b/v3.3-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v3.3-compatibility/gl/KHR/dummy.go +++ b/v3.3-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v3.3-compatibility/gl/build_cgo_hack.go b/v3.3-compatibility/gl/build_cgo_hack.go index 1309b7f..cc4dbcd 100644 --- a/v3.3-compatibility/gl/build_cgo_hack.go +++ b/v3.3-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v3.3-compatibility/gl/conversions.go b/v3.3-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v3.3-compatibility/gl/conversions.go +++ b/v3.3-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v3.3-compatibility/gl/package.go b/v3.3-compatibility/gl/package.go index 28d8c7d..6bd5f3d 100644 --- a/v3.3-compatibility/gl/package.go +++ b/v3.3-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v3.3-compatibility/gl/procaddr.go b/v3.3-compatibility/gl/procaddr.go index c1a29ad..4bcc6b2 100644 --- a/v3.3-compatibility/gl/procaddr.go +++ b/v3.3-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility33(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility33(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility33(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility33(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility33(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v3.3-core/gl/KHR/dummy.go b/v3.3-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v3.3-core/gl/KHR/dummy.go +++ b/v3.3-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v3.3-core/gl/build_cgo_hack.go b/v3.3-core/gl/build_cgo_hack.go index bdf3fe7..6c59262 100644 --- a/v3.3-core/gl/build_cgo_hack.go +++ b/v3.3-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v3.3-core/gl/conversions.go b/v3.3-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v3.3-core/gl/conversions.go +++ b/v3.3-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v3.3-core/gl/package.go b/v3.3-core/gl/package.go index a58330c..1c38c37 100644 --- a/v3.3-core/gl/package.go +++ b/v3.3-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v3.3-core/gl/procaddr.go b/v3.3-core/gl/procaddr.go index c45a841..4bcc6b2 100644 --- a/v3.3-core/gl/procaddr.go +++ b/v3.3-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore33(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore33(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore33(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore33(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore33(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.1-compatibility/gl/KHR/dummy.go b/v4.1-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.1-compatibility/gl/KHR/dummy.go +++ b/v4.1-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.1-compatibility/gl/build_cgo_hack.go b/v4.1-compatibility/gl/build_cgo_hack.go index e3f6e5e..c5665c2 100644 --- a/v4.1-compatibility/gl/build_cgo_hack.go +++ b/v4.1-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.1-compatibility/gl/conversions.go b/v4.1-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.1-compatibility/gl/conversions.go +++ b/v4.1-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.1-compatibility/gl/package.go b/v4.1-compatibility/gl/package.go index 0f503ca..7517f34 100644 --- a/v4.1-compatibility/gl/package.go +++ b/v4.1-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.1-compatibility/gl/procaddr.go b/v4.1-compatibility/gl/procaddr.go index 13eb840..4bcc6b2 100644 --- a/v4.1-compatibility/gl/procaddr.go +++ b/v4.1-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility41(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility41(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility41(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility41(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility41(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.1-core/gl/KHR/dummy.go b/v4.1-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.1-core/gl/KHR/dummy.go +++ b/v4.1-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.1-core/gl/build_cgo_hack.go b/v4.1-core/gl/build_cgo_hack.go index ead449f..82c42f9 100644 --- a/v4.1-core/gl/build_cgo_hack.go +++ b/v4.1-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.1-core/gl/conversions.go b/v4.1-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.1-core/gl/conversions.go +++ b/v4.1-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.1-core/gl/package.go b/v4.1-core/gl/package.go index d226e2b..0b58b86 100644 --- a/v4.1-core/gl/package.go +++ b/v4.1-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.1-core/gl/procaddr.go b/v4.1-core/gl/procaddr.go index 0c0ce3d..4bcc6b2 100644 --- a/v4.1-core/gl/procaddr.go +++ b/v4.1-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore41(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore41(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore41(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore41(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore41(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.2-compatibility/gl/KHR/dummy.go b/v4.2-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.2-compatibility/gl/KHR/dummy.go +++ b/v4.2-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.2-compatibility/gl/build_cgo_hack.go b/v4.2-compatibility/gl/build_cgo_hack.go index 408afe4..8ebc669 100644 --- a/v4.2-compatibility/gl/build_cgo_hack.go +++ b/v4.2-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.2-compatibility/gl/conversions.go b/v4.2-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.2-compatibility/gl/conversions.go +++ b/v4.2-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.2-compatibility/gl/package.go b/v4.2-compatibility/gl/package.go index 9a2f4fe..e4483ba 100644 --- a/v4.2-compatibility/gl/package.go +++ b/v4.2-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.2-compatibility/gl/procaddr.go b/v4.2-compatibility/gl/procaddr.go index c1bc530..4bcc6b2 100644 --- a/v4.2-compatibility/gl/procaddr.go +++ b/v4.2-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility42(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility42(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility42(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility42(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility42(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.2-core/gl/KHR/dummy.go b/v4.2-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.2-core/gl/KHR/dummy.go +++ b/v4.2-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.2-core/gl/build_cgo_hack.go b/v4.2-core/gl/build_cgo_hack.go index d6e9d4b..4628655 100644 --- a/v4.2-core/gl/build_cgo_hack.go +++ b/v4.2-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.2-core/gl/conversions.go b/v4.2-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.2-core/gl/conversions.go +++ b/v4.2-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.2-core/gl/package.go b/v4.2-core/gl/package.go index b298d0f..3c3cbeb 100644 --- a/v4.2-core/gl/package.go +++ b/v4.2-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.2-core/gl/procaddr.go b/v4.2-core/gl/procaddr.go index 896651f..4bcc6b2 100644 --- a/v4.2-core/gl/procaddr.go +++ b/v4.2-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore42(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore42(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore42(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore42(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore42(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.3-compatibility/gl/KHR/dummy.go b/v4.3-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.3-compatibility/gl/KHR/dummy.go +++ b/v4.3-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.3-compatibility/gl/build_cgo_hack.go b/v4.3-compatibility/gl/build_cgo_hack.go index 321fd11..478547f 100644 --- a/v4.3-compatibility/gl/build_cgo_hack.go +++ b/v4.3-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.3-compatibility/gl/conversions.go b/v4.3-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.3-compatibility/gl/conversions.go +++ b/v4.3-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.3-compatibility/gl/package.go b/v4.3-compatibility/gl/package.go index 4c640fb..0d89202 100644 --- a/v4.3-compatibility/gl/package.go +++ b/v4.3-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.3-compatibility/gl/procaddr.go b/v4.3-compatibility/gl/procaddr.go index 04c77de..4bcc6b2 100644 --- a/v4.3-compatibility/gl/procaddr.go +++ b/v4.3-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility43(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility43(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility43(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility43(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility43(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.3-core/gl/KHR/dummy.go b/v4.3-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.3-core/gl/KHR/dummy.go +++ b/v4.3-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.3-core/gl/build_cgo_hack.go b/v4.3-core/gl/build_cgo_hack.go index 0a57e8e..0c73174 100644 --- a/v4.3-core/gl/build_cgo_hack.go +++ b/v4.3-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.3-core/gl/conversions.go b/v4.3-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.3-core/gl/conversions.go +++ b/v4.3-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.3-core/gl/package.go b/v4.3-core/gl/package.go index c981b0b..8142595 100644 --- a/v4.3-core/gl/package.go +++ b/v4.3-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.3-core/gl/procaddr.go b/v4.3-core/gl/procaddr.go index 081d7ba..4bcc6b2 100644 --- a/v4.3-core/gl/procaddr.go +++ b/v4.3-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore43(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore43(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore43(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore43(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore43(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.4-compatibility/gl/KHR/dummy.go b/v4.4-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.4-compatibility/gl/KHR/dummy.go +++ b/v4.4-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.4-compatibility/gl/build_cgo_hack.go b/v4.4-compatibility/gl/build_cgo_hack.go index 34a5876..ee516ef 100644 --- a/v4.4-compatibility/gl/build_cgo_hack.go +++ b/v4.4-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.4-compatibility/gl/conversions.go b/v4.4-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.4-compatibility/gl/conversions.go +++ b/v4.4-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.4-compatibility/gl/package.go b/v4.4-compatibility/gl/package.go index 1c0de79..ebde7e9 100644 --- a/v4.4-compatibility/gl/package.go +++ b/v4.4-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.4-compatibility/gl/procaddr.go b/v4.4-compatibility/gl/procaddr.go index 9195347..4bcc6b2 100644 --- a/v4.4-compatibility/gl/procaddr.go +++ b/v4.4-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility44(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility44(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility44(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility44(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility44(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.4-core/gl/KHR/dummy.go b/v4.4-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.4-core/gl/KHR/dummy.go +++ b/v4.4-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.4-core/gl/build_cgo_hack.go b/v4.4-core/gl/build_cgo_hack.go index f9912e5..213fefa 100644 --- a/v4.4-core/gl/build_cgo_hack.go +++ b/v4.4-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.4-core/gl/conversions.go b/v4.4-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.4-core/gl/conversions.go +++ b/v4.4-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.4-core/gl/package.go b/v4.4-core/gl/package.go index d349489..2658019 100644 --- a/v4.4-core/gl/package.go +++ b/v4.4-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.4-core/gl/procaddr.go b/v4.4-core/gl/procaddr.go index 1ce382e..4bcc6b2 100644 --- a/v4.4-core/gl/procaddr.go +++ b/v4.4-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore44(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore44(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore44(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore44(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore44(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.5-compatibility/gl/KHR/dummy.go b/v4.5-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.5-compatibility/gl/KHR/dummy.go +++ b/v4.5-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.5-compatibility/gl/build_cgo_hack.go b/v4.5-compatibility/gl/build_cgo_hack.go index 86bf7de..45eede6 100644 --- a/v4.5-compatibility/gl/build_cgo_hack.go +++ b/v4.5-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.5-compatibility/gl/conversions.go b/v4.5-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.5-compatibility/gl/conversions.go +++ b/v4.5-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.5-compatibility/gl/package.go b/v4.5-compatibility/gl/package.go index c334007..a3b64ba 100644 --- a/v4.5-compatibility/gl/package.go +++ b/v4.5-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.5-compatibility/gl/procaddr.go b/v4.5-compatibility/gl/procaddr.go index 4713c80..4bcc6b2 100644 --- a/v4.5-compatibility/gl/procaddr.go +++ b/v4.5-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility45(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility45(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility45(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility45(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility45(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.5-core/gl/KHR/dummy.go b/v4.5-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.5-core/gl/KHR/dummy.go +++ b/v4.5-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.5-core/gl/build_cgo_hack.go b/v4.5-core/gl/build_cgo_hack.go index 0cc685d..db75aee 100644 --- a/v4.5-core/gl/build_cgo_hack.go +++ b/v4.5-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.5-core/gl/conversions.go b/v4.5-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.5-core/gl/conversions.go +++ b/v4.5-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.5-core/gl/package.go b/v4.5-core/gl/package.go index 01cea80..99688ae 100644 --- a/v4.5-core/gl/package.go +++ b/v4.5-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.5-core/gl/procaddr.go b/v4.5-core/gl/procaddr.go index a2c8208..4bcc6b2 100644 --- a/v4.5-core/gl/procaddr.go +++ b/v4.5-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore45(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore45(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore45(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore45(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore45(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.6-compatibility/gl/KHR/dummy.go b/v4.6-compatibility/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.6-compatibility/gl/KHR/dummy.go +++ b/v4.6-compatibility/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.6-compatibility/gl/build_cgo_hack.go b/v4.6-compatibility/gl/build_cgo_hack.go index 8449283..bfcf254 100644 --- a/v4.6-compatibility/gl/build_cgo_hack.go +++ b/v4.6-compatibility/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.6-compatibility/gl/conversions.go b/v4.6-compatibility/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.6-compatibility/gl/conversions.go +++ b/v4.6-compatibility/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.6-compatibility/gl/package.go b/v4.6-compatibility/gl/package.go index e874fff..12b2394 100644 --- a/v4.6-compatibility/gl/package.go +++ b/v4.6-compatibility/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.6-compatibility/gl/procaddr.go b/v4.6-compatibility/gl/procaddr.go index 82f0937..4bcc6b2 100644 --- a/v4.6-compatibility/gl/procaddr.go +++ b/v4.6-compatibility/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcompatibility46(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcompatibility46(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcompatibility46(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcompatibility46(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcompatibility46(cname) + return C.GlowGetProcAddress(cname) } diff --git a/v4.6-core/gl/KHR/dummy.go b/v4.6-core/gl/KHR/dummy.go index 41053ac..9bdbdef 100644 --- a/v4.6-core/gl/KHR/dummy.go +++ b/v4.6-core/gl/KHR/dummy.go @@ -1,3 +1,4 @@ +//go:build required // +build required // Package dummy prevents go tooling from stripping the c dependencies. diff --git a/v4.6-core/gl/build_cgo_hack.go b/v4.6-core/gl/build_cgo_hack.go index 9469749..f476ed0 100644 --- a/v4.6-core/gl/build_cgo_hack.go +++ b/v4.6-core/gl/build_cgo_hack.go @@ -1,3 +1,4 @@ +//go:build required // +build required package gl diff --git a/v4.6-core/gl/conversions.go b/v4.6-core/gl/conversions.go index d86ca8d..bd70f24 100644 --- a/v4.6-core/gl/conversions.go +++ b/v4.6-core/gl/conversions.go @@ -17,9 +17,9 @@ import "C" // // For example: // -// var data []uint8 -// ... -// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) +// var data []uint8 +// ... +// gl.TexImage2D(gl.TEXTURE_2D, ..., gl.UNSIGNED_BYTE, gl.Ptr(&data[0])) func Ptr(data interface{}) unsafe.Pointer { if data == nil { return unsafe.Pointer(nil) diff --git a/v4.6-core/gl/package.go b/v4.6-core/gl/package.go index e61dc74..a53d112 100644 --- a/v4.6-core/gl/package.go +++ b/v4.6-core/gl/package.go @@ -12,8 +12,8 @@ // Package gl implements Go bindings to OpenGL. // // This package was automatically generated using Glow: -// https://github.com/go-gl/glow // +// https://github.com/go-gl/glow package gl // #cgo !gles2,darwin LDFLAGS: -framework OpenGL diff --git a/v4.6-core/gl/procaddr.go b/v4.6-core/gl/procaddr.go index df487f9..4bcc6b2 100644 --- a/v4.6-core/gl/procaddr.go +++ b/v4.6-core/gl/procaddr.go @@ -33,7 +33,7 @@ package gl #if defined(TAG_EGL) #include #include - void* GlowGetProcAddress_glcore46(const char* name) { + static void* GlowGetProcAddress(const char* name) { return eglGetProcAddress(name); } #elif defined(TAG_WINDOWS) @@ -41,7 +41,7 @@ package gl #include #include static HMODULE ogl32dll = NULL; - void* GlowGetProcAddress_glcore46(const char* name) { + static void* GlowGetProcAddress(const char* name) { void* pf = wglGetProcAddress((LPCSTR) name); if (pf) { return pf; @@ -54,13 +54,13 @@ package gl #elif defined(TAG_DARWIN) #include #include - void* GlowGetProcAddress_glcore46(const char* name) { + static void* GlowGetProcAddress(const char* name) { return dlsym(RTLD_DEFAULT, name); } #elif defined(TAG_POSIX) #include #include - void* GlowGetProcAddress_glcore46(const char* name) { + static void* GlowGetProcAddress(const char* name) { return glXGetProcAddress((const GLubyte *) name); } #endif @@ -71,5 +71,5 @@ import "unsafe" func getProcAddress(namea string) unsafe.Pointer { cname := C.CString(namea) defer C.free(unsafe.Pointer(cname)) - return C.GlowGetProcAddress_glcore46(cname) + return C.GlowGetProcAddress(cname) }