Skip to content

Commit

Permalink
graphicsdriver/opengl: Use non-cgo gl package on Windows (#171)
Browse files Browse the repository at this point in the history
This is a temporal fix until go-gl/glow#102 is applied.
  • Loading branch information
hajimehoshi committed Dec 8, 2018
1 parent 65294f2 commit e8a1be7
Show file tree
Hide file tree
Showing 13 changed files with 49,721 additions and 3 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module github.com/hajimehoshi/ebiten

require (
github.com/go-gl/gl v0.0.0-20180407155706-68e253793080
github.com/go-gl/glfw v0.0.0-20181008143348-547915429f42
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/gopherjs/gopherwasm v1.0.1
Expand Down
3 changes: 1 addition & 2 deletions internal/graphicsdriver/opengl/context_desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import (
"errors"
"fmt"

"github.com/go-gl/gl/v2.1/gl"

"github.com/hajimehoshi/ebiten/internal/graphics"
"github.com/hajimehoshi/ebiten/internal/graphicsdriver/opengl/gl"
"github.com/hajimehoshi/ebiten/internal/mainthread"
)

Expand Down
21 changes: 21 additions & 0 deletions internal/graphicsdriver/opengl/gl/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Eric Woroshow

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions internal/graphicsdriver/opengl/gl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This package is basically same as `github.com/go-gl/gl`, but 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.
111 changes: 111 additions & 0 deletions internal/graphicsdriver/opengl/gl/conversions_notwindows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

109 changes: 109 additions & 0 deletions internal/graphicsdriver/opengl/gl/conversions_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions internal/graphicsdriver/opengl/gl/debug_notwindows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions internal/graphicsdriver/opengl/gl/debug_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8a1be7

Please sign in to comment.