Skip to content

Commit

Permalink
Add OpenBSD support (go-gl#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdassow authored Dec 13, 2020
1 parent 1d156fa commit b0ec079
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tmpl/package.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ package {{.Name}}
// #cgo darwin LDFLAGS: -framework OpenGL
// #cgo windows LDFLAGS: -lopengl32
//
// #cgo !egl,linux !egl,freebsd pkg-config: gl
// #cgo egl,linux egl,freebsd pkg-config: egl
// #cgo !egl,linux !egl,freebsd !egl,openbsd pkg-config: gl
// #cgo egl,linux egl,freebsd egl,openbsd pkg-config: egl
//
// #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
// #ifndef WIN32_LEAN_AND_MEAN
Expand Down
10 changes: 5 additions & 5 deletions tmpl/procaddr.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
// windows: WGL
// darwin: CGL
// linux freebsd: GLX
// linux freebsd openbsd: GLX
//
// Use of EGL instead of the platform's default (listed above) is made possible
// via the "egl" build tag.
Expand All @@ -24,11 +24,11 @@ package {{.Name}}
#cgo darwin CFLAGS: -DTAG_DARWIN
#cgo darwin LDFLAGS: -framework OpenGL

#cgo linux freebsd CFLAGS: -DTAG_POSIX
#cgo !egl,linux !egl,freebsd pkg-config: gl
#cgo linux freebsd openbsd CFLAGS: -DTAG_POSIX
#cgo !egl,linux !egl,freebsd !egl,openbsd pkg-config: gl

#cgo egl,linux egl,freebsd CFLAGS: -DTAG_EGL
#cgo egl,linux egl,freebsd pkg-config: egl
#cgo egl,linux egl,freebsd egl,openbsd CFLAGS: -DTAG_EGL
#cgo egl,linux egl,freebsd egl,openbsd pkg-config: egl


// Check the EGL tag first as it takes priority over the platform's default
Expand Down

0 comments on commit b0ec079

Please sign in to comment.