diff --git a/internal/graphicsdriver/opengl/shader_gles.go b/internal/graphicsdriver/opengl/shader_gles.go deleted file mode 100644 index f309af4a8..000000000 --- a/internal/graphicsdriver/opengl/shader_gles.go +++ /dev/null @@ -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 -} diff --git a/internal/graphicsdriver/opengl/shader_gl.go b/internal/graphicsdriver/opengl/shader_notjs.go similarity index 92% rename from internal/graphicsdriver/opengl/shader_gl.go rename to internal/graphicsdriver/opengl/shader_notjs.go index 1281999f9..307a17621 100644 --- a/internal/graphicsdriver/opengl/shader_gl.go +++ b/internal/graphicsdriver/opengl/shader_notjs.go @@ -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 }