Skip to content

Commit

Permalink
Add gles2 tag to allowing using ANGLE (EGL+ OpenGLES2) on windows (#113)
Browse files Browse the repository at this point in the history
still keep the Desktop OpenGL option default for windows

Co-authored-by: Zhao Wang <[email protected]>
  • Loading branch information
zwang and zwang authored Mar 6, 2021
1 parent e6c47aa commit b197509
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tmpl/package.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ package {{.Name}}
{{define "paramsGoCall"}}{{range $i, $p := .}}{{if ne $i 0}}, {{end}}{{$p.Type.ConvertGoToC $p.GoName}}{{end}}{{end}}

// #cgo darwin LDFLAGS: -framework OpenGL
// #cgo windows LDFLAGS: -lopengl32
// #cgo !gles2,windows LDFLAGS: -lopengl32
// #cgo gles2,windows LDFLAGS: -lGLESv2
//
// #cgo !egl,linux !egl,freebsd !egl,openbsd pkg-config: gl
// #cgo egl,linux egl,freebsd egl,openbsd pkg-config: egl
Expand Down
3 changes: 2 additions & 1 deletion tmpl/procaddr.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ package {{.Name}}

/*
#cgo windows CFLAGS: -DTAG_WINDOWS
#cgo windows LDFLAGS: -lopengl32
#cgo !gles2,windows LDFLAGS: -lopengl32
#cgo gles2,windows LDFLAGS: -lGLESv2

#cgo darwin CFLAGS: -DTAG_DARWIN
#cgo darwin LDFLAGS: -framework OpenGL
Expand Down

0 comments on commit b197509

Please sign in to comment.