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 (
|
const (
|
||||||
InvalidImageID = -1
|
InvalidImageID = 0
|
||||||
InvalidShaderID = -1
|
InvalidShaderID = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
type Graphics interface {
|
type Graphics interface {
|
||||||
|
@ -408,15 +408,13 @@ func (g *Graphics) checkSize(width, height int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *Graphics) genNextImageID() driver.ImageID {
|
func (g *Graphics) genNextImageID() driver.ImageID {
|
||||||
id := g.nextImageID
|
|
||||||
g.nextImageID++
|
g.nextImageID++
|
||||||
return id
|
return g.nextImageID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *Graphics) genNextShaderID() driver.ShaderID {
|
func (g *Graphics) genNextShaderID() driver.ShaderID {
|
||||||
id := g.nextShaderID
|
|
||||||
g.nextShaderID++
|
g.nextShaderID++
|
||||||
return id
|
return g.nextShaderID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *Graphics) NewImage(width, height int) (driver.Image, error) {
|
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 {
|
func (g *Graphics) genNextImageID() driver.ImageID {
|
||||||
id := g.nextImageID
|
|
||||||
g.nextImageID++
|
g.nextImageID++
|
||||||
return id
|
return g.nextImageID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *Graphics) genNextShaderID() driver.ShaderID {
|
func (g *Graphics) genNextShaderID() driver.ShaderID {
|
||||||
id := g.nextShaderID
|
|
||||||
g.nextShaderID++
|
g.nextShaderID++
|
||||||
return id
|
return g.nextShaderID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *Graphics) NewImage(width, height int) (driver.Image, error) {
|
func (g *Graphics) NewImage(width, height int) (driver.Image, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user