From a60976f260f3d9257a87281a4860fac00d7dca8c Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Thu, 8 Mar 2018 13:53:49 +1100 Subject: [PATCH] internal/graphics: increase defaultViewportSize to 8192 (#538) This makes it possible to run ebiten applications in full screen on 5k displays, such as Apple's 27" iMac. Fix issue #537 --- internal/graphics/framebuffer.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/graphics/framebuffer.go b/internal/graphics/framebuffer.go index f8999c55e..320dcc2ee 100644 --- a/internal/graphics/framebuffer.go +++ b/internal/graphics/framebuffer.go @@ -70,8 +70,11 @@ func newScreenFramebuffer(width, height int) *framebuffer { // defaultViewportSize is the default size (width or height) of viewport. // -// defaultViewportSize also represents the maximum size of a framebuffer. -const defaultViewportSize = 4096 +// defaultViewportSize also represents the maximum size of a framebuffer +// and of an Image (it is used to declare MaxImageSize). +// +// For portability reasons it must be a power of two. +const defaultViewportSize = 8192 // viewportSize returns the viewport size of the framebuffer. func (f *framebuffer) viewportSize() (int, int) {