mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
internal/driver: Change InvalidImageID/InvalidShaderID to 0
This commit is contained in:
parent
73bf1f36e5
commit
b9d52c0267
@ -30,8 +30,8 @@ type Region struct {
|
||||
}
|
||||
|
||||
const (
|
||||
InvalidImageID = -1
|
||||
InvalidShaderID = -1
|
||||
InvalidImageID = 0
|
||||
InvalidShaderID = 0
|
||||
)
|
||||
|
||||
type Graphics interface {
|
||||
|
@ -408,15 +408,13 @@ func (g *Graphics) checkSize(width, height int) {
|
||||
}
|
||||
|
||||
func (g *Graphics) genNextImageID() driver.ImageID {
|
||||
id := g.nextImageID
|
||||
g.nextImageID++
|
||||
return id
|
||||
return g.nextImageID
|
||||
}
|
||||
|
||||
func (g *Graphics) genNextShaderID() driver.ShaderID {
|
||||
id := g.nextShaderID
|
||||
g.nextShaderID++
|
||||
return id
|
||||
return g.nextShaderID
|
||||
}
|
||||
|
||||
func (g *Graphics) NewImage(width, height int) (driver.Image, error) {
|
||||
|
@ -74,15 +74,13 @@ func (g *Graphics) checkSize(width, height int) {
|
||||
}
|
||||
|
||||
func (g *Graphics) genNextImageID() driver.ImageID {
|
||||
id := g.nextImageID
|
||||
g.nextImageID++
|
||||
return id
|
||||
return g.nextImageID
|
||||
}
|
||||
|
||||
func (g *Graphics) genNextShaderID() driver.ShaderID {
|
||||
id := g.nextShaderID
|
||||
g.nextShaderID++
|
||||
return id
|
||||
return g.nextShaderID
|
||||
}
|
||||
|
||||
func (g *Graphics) NewImage(width, height int) (driver.Image, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user