Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Drop minimum width/2 height/2 screen constraint? #1661
As part of the recent fit-to-screen change in Emscripten, we fit e.g. a 720p display in a 640x280/360x560 browser client area. This is below 360p and causes issues due to the following constraint in gldraw.pyx:
I would suggest removing it since there is a second limitation of 256*256 a bit below which seems enough to prevent aberrant values:
What do you think?
The main idea here is to stop people from dropping it below the 50% point, which is where aliasing starts occurring for a non-mipmapped texture. I should be adding mipmapping in 7.2, so we should be able to drop this there. (Though I think that shrinking the browser that small is a terrible idea, and it probably makes sense to configure things to pop up a new browser window rather than force people to view a game that small by default.)
More specifically, I'll drop this in the gl2 path, while leaving it intact in the gl renderer, which I'd like to avoid touching.
I feel I'm missing something, because I realized Android is not affected by the /2 limit, e.g. a 1080p game is resized correctly on my 360p phone (/3). Even more, if forced in portrait mode the game area is tiny but still no stretching or partial offscreen.
The "/2" code I quoted above is outside of the