mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphics: Refactoring
This commit is contained in:
parent
93c31654da
commit
847a8b4d53
@ -14,14 +14,14 @@
|
|||||||
|
|
||||||
package graphics
|
package graphics
|
||||||
|
|
||||||
// minInternalImageSize is the minimum size of internal images (texture/framebuffer).
|
|
||||||
//
|
|
||||||
// For example, the image size less than 15 is not supported on some iOS devices.
|
|
||||||
// See also: https://stackoverflow.com/questions/15935651
|
|
||||||
const minInternalImageSize = 16
|
|
||||||
|
|
||||||
// InternalImageSize returns a nearest appropriate size as an internal image.
|
// InternalImageSize returns a nearest appropriate size as an internal image.
|
||||||
func InternalImageSize(x int) int {
|
func InternalImageSize(x int) int {
|
||||||
|
// minInternalImageSize is the minimum size of internal images (texture/framebuffer).
|
||||||
|
//
|
||||||
|
// For example, the image size less than 15 is not supported on some iOS devices.
|
||||||
|
// See also: https://stackoverflow.com/questions/15935651
|
||||||
|
const minInternalImageSize = 16
|
||||||
|
|
||||||
if x <= 0 {
|
if x <= 0 {
|
||||||
panic("graphics: x must be positive")
|
panic("graphics: x must be positive")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user