Commit Graph

211 Commits

Author SHA1 Message Date
Hajime Hoshi
e273618081 input: Rename Reset -> ResetForFrame 2019-03-31 18:49:00 +09:00
Hajime Hoshi
7445144194 Move graphicsdriver.GrapahicsDriver to driver.Graphics 2019-03-30 22:38:02 +09:00
Hajime Hoshi
747d1be54e driver: Move getting actual drivers to ebiten package 2019-03-30 22:19:21 +09:00
Hajime Hoshi
8ec7ae4c08 Rename drivers -> driver 2019-03-28 01:48:45 +09:00
Hajime Hoshi
5e38f81462 Create packages drivers having actual drivers 2019-03-25 00:29:56 +09:00
Hajime Hoshi
5990da4844 graphics: Add makeVolatile instead of newVolatileImage 2019-02-13 00:41:26 +09:00
Hajime Hoshi
a3eddeb50f Improve panic messages 2019-02-06 23:43:03 -10:00
Hajime Hoshi
5be567d58f ui: Implement restoring context lost on browsers correctly
Fixes #734
2019-02-01 01:20:40 +09:00
Hajime Hoshi
1f4e593099 graphics: Add comments 2019-01-25 03:04:25 +09:00
Hajime Hoshi
18daa04173 Reland: graphics: Use math.Ceil for the screen framebuffer size (#622)
This is reland of 0b60471ac0.

I thought this didn't take any effect, but I confirmed this
actually fixed (part of) the blinking-line problem on Xperia XZ.
This fixes the upper side thin line. I'm not sure this fixes the
lower side thin line, which is reported but I couldn't reproduce.

I expect this and e829e650f2 will
fix the reported problem, and I am going to confirm this.
2019-01-25 02:50:55 +09:00
Hajime Hoshi
837571d05c graphics: Refactoring 2019-01-22 02:07:20 +09:00
Hajime Hoshi
4ce850df70 graphics: Bug fix: Resolve pixels before the screen is cleared
Fixes #792

Clearing the screen is so special on some environments (like macOS
Metal) that other operations on other images can be invalidated.

This fixes the issue by resolving the pixels of the offscreen that
is used as a render source for the screen before the screen is
cleared. We are not sure this is a correct way, but this actually
fixes the problem on macOS.
2019-01-22 01:44:51 +09:00
Hajime Hoshi
e829e650f2 graphics: Always clear the screen framebuffer
This fixes the issue on Xperia Z3, but not on Xperia XY
2019-01-18 12:21:01 +09:00
Hajime Hoshi
9da54db1d9 Revert "graphics: Use math.Ceil for the screen framebuffer size"
This reverts commit 0b60471ac0.

Reason: This doesn't have any effect.
2019-01-17 11:21:03 +09:00
Hajime Hoshi
0d84d8dccb Revert: graphics: Use an even number for screen height offset
This reverts a82201cfe8.

I think this change does not make sense.
2019-01-16 23:50:11 +09:00
Hajime Hoshi
0b60471ac0 graphics: Use math.Ceil for the screen framebuffer size
There are glitches on some mobile devices like Xperia. As the
screen framebuffer size might not fit with the actual GL surface
size, we guessed that is the cause of the glitches.

By using math.Ceil, the screen framebuffer will be a little bigger
and can cover the GL surface.
2019-01-16 23:41:52 +09:00
Hajime Hoshi
1e1f309a1c shareable: Add Fill
Before introducing Fill, filling an image with a solid color was
implemented by ReplacePixels. When an offscreen image is used, the
offscreen image is not fully cleared or filled with a color and
out of (0,0)-(width,height) region. This causes a glitch thin line
on mobile platforms.

This change adds (*shareable.Image).Fill to fill the whole
framebuffer region of the image.
2019-01-13 02:12:47 +09:00
Hajime Hoshi
d5e6e6893e graphics: Refactoring 2019-01-13 00:56:33 +09:00
Hajime Hoshi
ff62876552 Add Metal implementation
Fixes #621
2018-12-20 02:37:10 +09:00
Hajime Hoshi
bc3ca38f76 opengl: Rename ResetGLState -> Reset and other functions 2018-11-01 03:02:08 +09:00
Hajime Hoshi
ce60f44490 graphics: Add (*mipmap).original() 2018-10-25 02:11:54 +09:00
Hajime Hoshi
15cad6ed9a graphics: Rename shareableImages -> mipmap 2018-10-25 02:05:25 +09:00
Hajime Hoshi
7494b19dea graphics: Refactoring: Add shareableImages struct 2018-10-24 01:09:59 +09:00
Hajime Hoshi
15260537a2 graphics: Bug fix: fullscreen rendering was wrong
After fad65f2f5d, the viewport size
is always same as the framebuffer size. The 'screen' image size
was the actual rendering region size, and padding was not
considered in the size. The padding is added on the fullscreen
mode.

This fix adds the extra padding values to the 'screen' image size
so that the 'screen' framebuffer will be same size as the monitor
size.

Fixes #693
2018-09-29 21:47:41 +09:00
Hajime Hoshi
8827520d4a graphics: Bug fix: avoid jaggy rendering on macOS by adjusting texels (#669) 2018-08-30 00:17:03 +09:00
Hajime Hoshi
a82201cfe8 graphics: Use an even number for screen height offset
Fixes #622
2018-08-12 20:12:05 +09:00
Hajime Hoshi
9e9a05ee54 graphics: Remove redundant disposing images 2018-07-30 00:25:51 +09:00
Hajime Hoshi
c720c8e1cb graphics: Dispose mipmap images for the offscreen every frame 2018-07-30 00:03:34 +09:00
Hajime Hoshi
8a221a5774 graphics: Use mipmap images for minifying images with linear filter
Fixes #578
2018-07-29 23:33:49 +09:00
Hajime Hoshi
c98ec30c10 graphics: Add comments 2018-07-18 03:05:09 +09:00
Hajime Hoshi
0593b77eb8 ui: Implement CurrentTPS 2018-07-18 02:11:00 +09:00
Hajime Hoshi
e99f2f9f69 ui: Rename TPS -> MaxTPS 2018-07-17 22:41:27 +09:00
Hajime Hoshi
a7a1f6b4c6 ui: Rename SetTPS -> SetMaxTPS, Introduce UncappedTPS 2018-07-17 22:33:53 +09:00
Hajime Hoshi
3a8ca5ad73 ui: Implement TPS/SetTPS
Fixes #605
Fixes #321
2018-07-17 01:58:00 +09:00
Hajime Hoshi
1626e40822 Refactoring: Avoid using const FPS 2018-07-17 00:53:00 +09:00
Hajime Hoshi
18ec1d8265 internal/clock: Update takes FPS 2018-07-16 01:03:23 +09:00
Hajime Hoshi
aed0bf4a37 graphics: Check error at the end of the frame
The error should be raised as soon as possible.
2018-07-12 03:16:31 +09:00
Hajime Hoshi
6c8b7f8e9c graphics: Refactoring: Reduce error propagations 2018-07-12 03:08:50 +09:00
Hajime Hoshi
3cd9dfd800 Rename IsRunningSlowly to IsDrawingSkipped
Fixes #643
2018-07-10 22:31:26 +09:00
Hajime Hoshi
3136ef5fbd graphics: More exact scaling
This is related to #622
2018-06-08 00:07:39 +09:00
Hajime Hoshi
c62e63f874 graphics: Remove 'filter' argument from newVolatileImage (#503) 2018-04-06 03:34:14 +09:00
Hajime Hoshi
7b5ad46e49 shareable: NewImage* now returns a cleared image 2018-04-06 02:08:12 +09:00
Hajime Hoshi
87daa82ad9 graphics: Replace emptyImage with dummyImage (not initialized) 2018-04-06 00:49:49 +09:00
Hajime Hoshi
97ce612785 Refactoring: Don't access restorable package directly from ebiten package 2018-03-25 23:37:32 +09:00
Hajime Hoshi
1b0e71765f internal/hooks: Rename Update -> BeforeUpdate 2018-03-15 02:50:10 +09:00
Hajime Hoshi
a2d6ae7eee shareable: Rename ImagePart -> Image 2018-03-11 00:05:06 +09:00
Hajime Hoshi
1556db74fa graphics: Rename sharedImage -> shareableImage 2018-03-10 23:39:06 +09:00
Hajime Hoshi
afda41a5ed graphics: Refactoring: Remove (*Image).restorable 2018-03-10 23:18:50 +09:00
Hajime Hoshi
e977019d2f graphics: Detect maximum texture size for each environment
Fixes #537, #539

See also #541
2018-03-09 11:47:23 +09:00
Hajime Hoshi
5bfdc6d29a graphics: The screen filter might be heavy 2018-03-05 11:09:06 +09:00