mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
opengl: Bug fix: glGetShaderPrecisionFormat returns wrong values on emulators (#239)
This commit is contained in:
parent
47a0b3ccfa
commit
cc39cdc8f5
@ -260,6 +260,11 @@ func (c *Context) DeleteShader(s Shader) {
|
||||
func (c *Context) GlslHighpSupported() bool {
|
||||
gl := c.gl
|
||||
_, _, precision := gl.GetShaderPrecisionFormat(mgl.FRAGMENT_SHADER, mgl.HIGH_FLOAT)
|
||||
// On Android emulators, precision might be a wrong value (#239).
|
||||
// TODO: If possible, check if this is running on an emulator.
|
||||
if 64 <= precision {
|
||||
return false
|
||||
}
|
||||
return precision != 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user