graphics: Refactoring

This commit is contained in:
Hajime Hoshi 2019-06-26 00:18:40 +09:00
parent 93c31654da
commit 847a8b4d53

View File

@ -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")
} }