internal/graphicsdriver/opengl: enable to compiile for browsers with the 'opengles' tag

The 'opengles' tag is just ignored for browsers.
This commit is contained in:
Hajime Hoshi 2022-10-15 22:22:25 +09:00
parent 37c5f53890
commit 257f05883c
4 changed files with 10 additions and 3 deletions

View File

@ -12,8 +12,9 @@
// 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 || opengles //go:build (android || ios || opengles) && !js
// +build android ios opengles // +build android ios opengles
// +build !js
package opengl package opengl

View File

@ -12,8 +12,9 @@
// 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 || opengles //go:build (android || ios || opengles) && !js
// +build android ios opengles // +build android ios opengles
// +build !js
package opengl package opengl

View File

@ -18,6 +18,10 @@ import (
"syscall/js" "syscall/js"
) )
func (g *Graphics) init() {
// Do nothing.
}
func (g *Graphics) SetCanvas(canvas js.Value) { func (g *Graphics) SetCanvas(canvas js.Value) {
g.context.canvas = canvas g.context.canvas = canvas
} }

View File

@ -12,8 +12,9 @@
// 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 || opengles //go:build (android || ios || opengles) && !js
// +build android ios opengles // +build android ios opengles
// +build !js
package opengl package opengl