ebiten: Rename Draw*WithShader -> Draw*Shader

Updates #1168
This commit is contained in:
Hajime Hoshi
2020-07-25 23:15:08 +09:00
parent eb056690aa
commit 2bdbcd724d
3 changed files with 30 additions and 28 deletions

View File

@@ -107,14 +107,14 @@ func (g *Game) Draw(screen *ebiten.Image) {
w, h := screen.Size()
cx, cy := ebiten.CursorPosition()
op := &ebiten.DrawRectangleWithShaderOptions{}
op := &ebiten.DrawRectShaderOptions{}
op.Uniforms = []interface{}{
float32(g.time) / 60, // Time
[]float32{float32(cx), float32(cy)}, // Cursor
}
op.Images[0] = gopherImage
op.Images[1] = normalImage
screen.DrawRectangleWithShader(w, h, s, op)
screen.DrawRectShader(w, h, s, op)
msg := "Press Up/Down to switch the shader."
ebitenutil.DebugPrint(screen, msg)