add the ebitengine version build tags besides the ebiten version

Closes #2111
Updates #2190
This commit is contained in:
Hajime Hoshi 2022-07-09 15:32:37 +09:00
parent 8bbea60e0e
commit 28fd3ec9e5
9 changed files with 23 additions and 18 deletions

View File

@ -131,7 +131,7 @@ jobs:
run: | run: |
# TODO: Add -shuffle=on after agnivade/wasmbrowsertest#23 is fixed. # TODO: Add -shuffle=on after agnivade/wasmbrowsertest#23 is fixed.
env GOOS=js GOARCH=wasm go test -tags=example -v ./... env GOOS=js GOARCH=wasm go test -tags=example -v ./...
env GOOS=js GOARCH=wasm go test -tags=example,ebitenwebgl1 -v ./... env GOOS=js GOARCH=wasm go test -tags=example,ebitenginewebgl1 -v ./...
- name: Install ebitenmobile - name: Install ebitenmobile
run: | run: |

8
doc.go
View File

@ -63,7 +63,7 @@
// //
// `EBITENGINE_INTERNAL_IMAGES_KEY` environment variable specifies the key // `EBITENGINE_INTERNAL_IMAGES_KEY` environment variable specifies the key
// to dump all the internal images. This is valid only when the build tag // to dump all the internal images. This is valid only when the build tag
// 'ebitendebug' is specified. This works only on desktops. // 'ebitenginedebug' is specified. This works only on desktops.
// //
// `EBITENGINE_GRAPHICS_LIBRARY` environment variable specifies the graphics library. // `EBITENGINE_GRAPHICS_LIBRARY` environment variable specifies the graphics library.
// If the specified graphics library is not available, RunGame returns an error. // If the specified graphics library is not available, RunGame returns an error.
@ -82,12 +82,12 @@
// //
// Build tags // Build tags
// //
// `ebitendebug` outputs a log of graphics commands. This is useful to know what happens in Ebitengine. In general, the // `ebitenginedebug` outputs a log of graphics commands. This is useful to know what happens in Ebitengine. In general, the
// number of graphics commands affects the performance of your game. // number of graphics commands affects the performance of your game.
// //
// `ebitenwebgl1` forces to use WebGL 1 on browsers. // `ebitenginewebgl1` forces to use WebGL 1 on browsers.
// //
// `ebitensinglethread` disables Ebitengine's thread safety to unlock maximum performance. If you use this you will have // `ebitenginesinglethread` disables Ebitengine's thread safety to unlock maximum performance. If you use this you will have
// to manage threads yourself. Functions like IsKeyPressed will no longer be concurrent-safe with this build tag. // to manage threads yourself. Functions like IsKeyPressed will no longer be concurrent-safe with this build tag.
// They must be called from the main thread or the same goroutine as the given game's callback functions like Update // They must be called from the main thread or the same goroutine as the given game's callback functions like Update
// to RunGame. // to RunGame.

View File

@ -142,7 +142,7 @@ func (i *imageDumper) update() error {
i.dumpInternalImagesKey = key i.dumpInternalImagesKey = key
} }
} else { } else {
fmt.Fprintf(os.Stderr, "%s is disabled. Specify a build tag 'ebitendebug' to enable it.\n", envInternalImagesKey) fmt.Fprintf(os.Stderr, "%s is disabled. Specify a build tag 'ebitenginedebug' to enable it.\n", envInternalImagesKey)
} }
} }
} }

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:build ebitendebug //go:build ebitenginedebug || ebitendebug
// +build ebitendebug // +build ebitenginedebug ebitendebug
package debug package debug

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:build !ebitendebug //go:build !ebitenginedebug && !ebitendebug
// +build !ebitendebug // +build !ebitenginedebug,!ebitendebug
package debug package debug

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:build !ebitenwebgl1 //go:build !ebitenginewebgl1 && !ebitenwebgl1
// +build !ebitenwebgl1 // +build !ebitenginewebgl1,!ebitenwebgl1
package opengl package opengl

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:build ebitenwebgl1 //go:build ebitenginewebgl1 || ebitenwebgl1
// +build ebitenwebgl1 // +build ebitenginewebgl1 ebitenwebgl1
package opengl package opengl

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:build !android && !ios && !js && !ebitenginecbackend && !ebitencbackend && !ebitensinglethread //go:build !android && !ios && !js && !ebitenginecbackend && !ebitencbackend && !ebitenginesinglethread && !ebitensinglethread
// +build !android,!ios,!js,!ebitenginecbackend,!ebitencbackend,!ebitensinglethread // +build !android,!ios,!js,!ebitenginecbackend,!ebitencbackend,!ebitenginesinglethread,!ebitensinglethread
package ui package ui

View File

@ -12,8 +12,13 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:build !android && !ios && !js && !ebitenginecbackend && !ebitencbackend && ebitensinglethread //go:build !android && !ios && !js && !ebitenginecbackend && !ebitencbackend && (ebitenginesinglethread || ebitensinglethread)
// +build !android,!ios,!js,!ebitenginecbackend,!ebitencbackend,ebitensinglethread // +build !android
// +build !ios
// +build !js
// +build !ebitenginecbackend
// +build !ebitencbackend
// +build ebitenginesinglethread ebitensinglethread
package ui package ui