diff --git a/.travis.yml b/.travis.yml index f1458688c..fdb99dfa3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,14 +8,12 @@ addons: sources: - ubuntu-toolchain-r-test packages: - - libglew-dev # required by node-gl. + - libglew-dev # required by headless-gl. - libopenal-dev - libalut-dev - libxxf86vm-dev before_install: - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start - export NODE_PATH=$(npm config get prefix)/lib/node_modules - npm install --global gl @@ -24,11 +22,18 @@ install: - go get github.com/gopherjs/gopherjs - go get github.com/gopherjs/webgl +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - sleep 3 + script: - go test -v ./... - - gopherjs test -v github.com/hajimehoshi/ebiten github.com/hajimehoshi/ebiten/internal/graphics - gopherjs build -v github.com/hajimehoshi/ebiten/example/blocks +# Looks like testing GL on node on Travis CI seems hard. +# - gopherjs test -v github.com/hajimehoshi/ebiten github.com/hajimehoshi/ebiten/internal/graphics + notifications: email: recipients: diff --git a/internal/graphics/opengl/context_js.go b/internal/graphics/opengl/context_js.go index 335cf141b..3a8c874d1 100644 --- a/internal/graphics/opengl/context_js.go +++ b/internal/graphics/opengl/context_js.go @@ -83,7 +83,11 @@ func NewContext() *Context { } } else { // Use headless-gl for testing. - webglContext := js.Global.Call("require", "gl").Invoke(16, 16) + options := map[string]bool{ + "alpha": true, + "premultipliedAlpha": true, + } + webglContext := js.Global.Call("require", "gl").Invoke(16, 16, options) gl = &webgl.Context{Object: webglContext} }