internal/graphicsdriver/opengl/gl: reland: refactoring: reduce opengles build tags

Updates #292
This commit is contained in:
Hajime Hoshi 2022-11-14 02:33:23 +09:00
parent e8810495cf
commit 114a8aa6ea
2 changed files with 4 additions and 26 deletions

View File

@ -1,25 +0,0 @@
// Copyright 2020 The Ebiten Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (android || ios || opengles) && !js
package opengl
import (
"github.com/hajimehoshi/ebiten/v2/internal/shaderir/glsl"
)
func (c *context) glslVersion() glsl.GLSLVersion {
return glsl.GLSLVersionES100
}

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !android && !ios && !js && !opengles
//go:build !js
package opengl
@ -21,5 +21,8 @@ import (
)
func (c *context) glslVersion() glsl.GLSLVersion {
if c.isES() {
return glsl.GLSLVersionES100
}
return glsl.GLSLVersionDefault
}