From 33c7f39f0f6161f96633a0c4f9170ff68ffbb748 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 23 Sep 2019 00:42:51 +0900 Subject: [PATCH] graphicsdriver/opengl/gl: Exclude all the files for Wasm Fixes #938 --- internal/graphicsdriver/opengl/gl/README.md | 4 +++- .../graphicsdriver/opengl/gl/conversions_notwindows.go | 5 +++-- internal/graphicsdriver/opengl/gl/conversions_windows.go | 4 +--- internal/graphicsdriver/opengl/gl/package.go | 8 +++----- internal/graphicsdriver/opengl/gl/package_notwindows.go | 5 +++-- internal/graphicsdriver/opengl/gl/package_windows.go | 2 +- internal/graphicsdriver/opengl/gl/procaddr_notwindows.go | 5 +++-- internal/graphicsdriver/opengl/gl/procaddr_windows.go | 5 +++-- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/internal/graphicsdriver/opengl/gl/README.md b/internal/graphicsdriver/opengl/gl/README.md index 04ab12714..b0e1a3b8c 100644 --- a/internal/graphicsdriver/opengl/gl/README.md +++ b/internal/graphicsdriver/opengl/gl/README.md @@ -1,3 +1,5 @@ -This package is basically same as `github.com/go-gl/gl/v2.1/gl`, but generated from `github.com/hajimehoshi/glow`'s `nocgo` branch. This enables to remove dependencies on Cgo on Windows. +This is a fork of `github.com/go-gl/gl/v2.1/gl` with the below patch. This is now modified manually. + +The original version is generated from `github.com/hajimehoshi/glow`'s `nocgo` branch. This enables to remove dependencies on Cgo on Windows. Now we are working on commiting this 'no-cgo' change to the official gl package. See https://github.com/go-gl/glow/pull/102. diff --git a/internal/graphicsdriver/opengl/gl/conversions_notwindows.go b/internal/graphicsdriver/opengl/gl/conversions_notwindows.go index 06074a7be..51ec9e2be 100644 --- a/internal/graphicsdriver/opengl/gl/conversions_notwindows.go +++ b/internal/graphicsdriver/opengl/gl/conversions_notwindows.go @@ -1,6 +1,7 @@ -// +build !windows +// SPDX-License-Identifier: MIT -// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT. +// +build !js +// +build !windows package gl diff --git a/internal/graphicsdriver/opengl/gl/conversions_windows.go b/internal/graphicsdriver/opengl/gl/conversions_windows.go index 55dd6fcc1..55a1b15b5 100644 --- a/internal/graphicsdriver/opengl/gl/conversions_windows.go +++ b/internal/graphicsdriver/opengl/gl/conversions_windows.go @@ -1,6 +1,4 @@ -// +build windows - -// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT. +// SPDX-License-Identifier: MIT package gl diff --git a/internal/graphicsdriver/opengl/gl/package.go b/internal/graphicsdriver/opengl/gl/package.go index 951550f14..141487cf6 100644 --- a/internal/graphicsdriver/opengl/gl/package.go +++ b/internal/graphicsdriver/opengl/gl/package.go @@ -1,4 +1,6 @@ -// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT. +// SPDX-License-Identifier: MIT + +// +build !js // Copyright (c) 2010 Khronos Group. // This material may be distributed subject to the terms and conditions @@ -10,10 +12,6 @@ // For details, see http://oss.sgi.com/projects/FreeB. // Package gl implements Go bindings to OpenGL. -// -// This package was automatically generated using Glow: -// https://github.com/go-gl/glow -// package gl const ( diff --git a/internal/graphicsdriver/opengl/gl/package_notwindows.go b/internal/graphicsdriver/opengl/gl/package_notwindows.go index 86de4fab4..e5432602e 100644 --- a/internal/graphicsdriver/opengl/gl/package_notwindows.go +++ b/internal/graphicsdriver/opengl/gl/package_notwindows.go @@ -1,6 +1,7 @@ -// +build !windows +// SPDX-License-Identifier: MIT -// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT. +// +build !js +// +build !windows package gl diff --git a/internal/graphicsdriver/opengl/gl/package_windows.go b/internal/graphicsdriver/opengl/gl/package_windows.go index f95193f13..c22abfa11 100644 --- a/internal/graphicsdriver/opengl/gl/package_windows.go +++ b/internal/graphicsdriver/opengl/gl/package_windows.go @@ -1,4 +1,4 @@ -// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT. +// SPDX-License-Identifier: MIT package gl diff --git a/internal/graphicsdriver/opengl/gl/procaddr_notwindows.go b/internal/graphicsdriver/opengl/gl/procaddr_notwindows.go index e5f5643d6..28b7390b4 100644 --- a/internal/graphicsdriver/opengl/gl/procaddr_notwindows.go +++ b/internal/graphicsdriver/opengl/gl/procaddr_notwindows.go @@ -1,6 +1,7 @@ -// +build !windows +// SPDX-License-Identifier: MIT -// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT. +// +build !js +// +build !windows // This file implements GlowGetProcAddress for every supported platform. The // correct version is chosen automatically based on build tags: diff --git a/internal/graphicsdriver/opengl/gl/procaddr_windows.go b/internal/graphicsdriver/opengl/gl/procaddr_windows.go index ab2221bc5..18c687595 100644 --- a/internal/graphicsdriver/opengl/gl/procaddr_windows.go +++ b/internal/graphicsdriver/opengl/gl/procaddr_windows.go @@ -1,10 +1,11 @@ -// Code generated by glow (https://github.com/hajimehoshi/glow's for_ebiten branch). DO NOT EDIT. +// SPDX-License-Identifier: MIT package gl import ( - "golang.org/x/sys/windows" "unsafe" + + "golang.org/x/sys/windows" ) var (