diff --git a/internal/graphicscommand/image.go b/internal/graphicscommand/image.go index e5a699981..164e57e05 100644 --- a/internal/graphicscommand/image.go +++ b/internal/graphicscommand/image.go @@ -27,17 +27,6 @@ var ( maxImageSize = 0 ) -// MaxImageSize returns the maximum of width/height of an image. -func MaxImageSize() int { - if maxImageSize == 0 { - maxImageSize = driver().MaxImageSize() - if maxImageSize == 0 { - panic("graphics: failed to get the max texture size") - } - } - return maxImageSize -} - // imageState is a state of an image. type imageState int diff --git a/internal/graphicsdriver/graphicsdriver.go b/internal/graphicsdriver/graphicsdriver.go index 08de6619e..69b8b53c9 100644 --- a/internal/graphicsdriver/graphicsdriver.go +++ b/internal/graphicsdriver/graphicsdriver.go @@ -22,7 +22,6 @@ import ( type GraphicsDriver interface { SetVertices(vertices []float32, indices []uint16) Flush() - MaxImageSize() int NewImage(width, height int) (Image, error) NewScreenFramebufferImage(width, height int) (Image, error) Reset() error diff --git a/internal/graphicsdriver/opengl/driver.go b/internal/graphicsdriver/opengl/driver.go index 93e5a6b0e..ad15db24d 100644 --- a/internal/graphicsdriver/opengl/driver.go +++ b/internal/graphicsdriver/opengl/driver.go @@ -105,7 +105,3 @@ func (d *Driver) Draw(indexLen int, indexOffset int, mode graphics.CompositeMode func (d *Driver) Flush() { d.context.flush() } - -func (d *Driver) MaxImageSize() int { - return d.context.getMaxTextureSize() -}