mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Bug fix: Stop using texel adjustment on iOS (#442)
This commit is contained in:
parent
b51f4d5312
commit
c62c195db3
@ -17,7 +17,6 @@ package ebiten
|
|||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten/internal/affine"
|
"github.com/hajimehoshi/ebiten/internal/affine"
|
||||||
"github.com/hajimehoshi/ebiten/internal/restorable"
|
"github.com/hajimehoshi/ebiten/internal/restorable"
|
||||||
"github.com/hajimehoshi/ebiten/internal/web"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// texelAdjustment represents a number to be used to adjust texel.
|
// texelAdjustment represents a number to be used to adjust texel.
|
||||||
@ -26,13 +25,6 @@ import (
|
|||||||
// See #317.
|
// See #317.
|
||||||
var texelAdjustment float32 = 256
|
var texelAdjustment float32 = 256
|
||||||
|
|
||||||
func init() {
|
|
||||||
if web.IsIOSSafari() {
|
|
||||||
// Texel adjustment causes glitches on iOS Safari.
|
|
||||||
texelAdjustment = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
quadFloat32Num = restorable.QuadVertexSizeInBytes() / 4
|
quadFloat32Num = restorable.QuadVertexSizeInBytes() / 4
|
||||||
theVerticesBackend = &verticesBackend{}
|
theVerticesBackend = &verticesBackend{}
|
||||||
|
22
vertices_ios.go
Normal file
22
vertices_ios.go
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
// +build ios
|
||||||
|
|
||||||
|
package ebiten
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
// Texel adjustment causes glitches on iOS.
|
||||||
|
texelAdjustment = 0
|
||||||
|
}
|
28
vertices_notios.go
Normal file
28
vertices_notios.go
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// Copyright 2017 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.
|
||||||
|
|
||||||
|
// +build !ios
|
||||||
|
|
||||||
|
package ebiten
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/hajimehoshi/ebiten/internal/web"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
if web.IsIOSSafari() {
|
||||||
|
// Texel adjustment causes glitches on iOS.
|
||||||
|
texelAdjustment = 0
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user