internal/graphicsdriver/opengl: introduce EBITENGINE_OPENGL replacing ebitenginewebgl1

This change inroduces a new environment variable `EBITENGINE_OPENGL`
to replace the build tag `ebitenginewebgl1`.
This commit is contained in:
Hajime Hoshi
2022-08-28 01:45:55 +09:00
parent 001c344d00
commit ec68534c73
5 changed files with 19 additions and 47 deletions

7
doc.go
View File

@@ -81,13 +81,16 @@
// "warp": Use WARP (i.e. software rendering).
// "debug": Use a debug layer.
//
// `EBITENGINE_OPENGL` environment variable specifies various parameters for OpenGL.
// You can specify multiple values separated by a comma. The default value is empty (i.e. no parameters).
//
// "webgl1": Use WebGL 1. This is valid only on browsers.
//
// # Build tags
//
// `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.
//
// `ebitenginewebgl1` forces to use WebGL 1 on browsers.
//
// `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.
// They must be called from the main thread or the same goroutine as the given game's callback functions like Update