Commit Graph

188 Commits

Author SHA1 Message Date
Hajime Hoshi
4fa52dcc56 Remove MonoGame support
Fixes #1148
2020-05-08 19:32:28 +09:00
Hajime Hoshi
274245e39c graphicsdriver/metal: Refactoring: Invert the viewport's Y direction 2020-05-08 18:12:30 +09:00
Hajime Hoshi
8029dc352a driver: Use framebuffer's Y directions 2020-05-08 16:49:19 +09:00
Hajime Hoshi
c43ba6e17d graphicsdriver/metal: Update comments 2020-05-08 05:49:38 +09:00
Hajime Hoshi
7068eb9284 graphicsdriver/metal: Simplify the projection matrix 2020-05-08 05:06:09 +09:00
Hajime Hoshi
7ad3343e9c graphicsdriver/monogame: Implement Pixels
Updates #1078
2020-04-22 02:23:16 +09:00
Hajime Hoshi
691e42f806 graphicsdriver/monogame: Bug fix: An underlying image size should be adjusted 2020-04-21 02:43:47 +09:00
Hajime Hoshi
b9e0b5f04b graphicsdriver/monogame: Change the V direction 2020-04-17 21:36:59 +09:00
Hajime Hoshi
de02bcf19f monogame: Update
Updates #1078
2020-04-14 03:23:54 +09:00
Hajime Hoshi
7b77164710 restorable: Ignore the error when restoring failed due to being not ready
(driver.Graphics).BeginFrame tries to restore the images, but
the context might be lost at that time yet. If the attempt to
restore the context because the driver is not ready, return
silently.

Fixes #1133
2020-04-12 20:01:18 +09:00
Hajime Hoshi
d0115f61ae graphicsdriver/monogame: Bug fix: Wrong viewport values 2020-04-11 18:56:50 +09:00
Hajime Hoshi
f0c2c0e8e9 monogame: Set viewports
Updates #1078
2020-04-06 02:36:15 +09:00
Hajime Hoshi
7f64043ba5 monogame: Implement drawing screens
Updates #1078
2020-04-06 01:51:06 +09:00
Hajime Hoshi
7dd9150b86 monogame: Implement Draw temporarily
Updates #1078
2020-04-06 00:13:08 +09:00
Hajime Hoshi
08ac91fb50 monogame: Refactoring 2020-04-05 20:00:53 +09:00
Hajime Hoshi
3a5f0a7a95 graphicsdriver/monogame: Implement some functions
Updates #1078
2020-04-05 17:36:26 +09:00
Hajime Hoshi
57a5783ca0 graphicsdriver/monogame: Implement ReplacePixels
Updates #1078
2020-04-05 04:44:48 +09:00
Hajime Hoshi
8809076682 graphicsdriver/monogame: Create a RenderTarget2D for an image
Updates #1078
2020-04-04 22:59:55 +09:00
Hajime Hoshi
eabe4152a7 graphicsdriver/opengl: Rename Driver -> Graphics 2020-04-04 17:23:38 +09:00
Hajime Hoshi
01d1afa25c graphicsdriver/metal: Rename Driver -> Graphics 2020-04-04 17:12:24 +09:00
Hajime Hoshi
6cbf37e855 Add graphicsdriver/monogame 2020-04-04 17:03:45 +09:00
Hajime Hoshi
b4a9538e1d graphicsdriver/opengl/gl: Remove a misspelled unused const 2020-02-26 12:06:47 +09:00
Hajime Hoshi
9298b044e3 graphicsdriver/metal: Bug fix: avoid using mtl.LoadActionDontCare
Fixes #1019
2020-02-11 20:29:03 +09:00
Hajime Hoshi
59431e1cad graphicsdriver/opengl: Leave comments why we don't use PBO on Android
Unfotunately, PBO might slow Android applications expecially when
coming back from context lost. Ebiten sends a lot of draw calls to
replace pixels in such case.

Until we find a good solution, let's not use PBO on Android.

Fixes #988
2020-01-19 17:02:34 +09:00
Hajime Hoshi
6eb05a0203 graphicsdriver/opengl: Enable to compile with gldebug 2020-01-13 18:55:30 +09:00
Hajime Hoshi
9be3495077 driver: Remove Graphics.SetWindow
Fixes #1026
2020-01-03 19:04:48 +09:00
Hajime Hoshi
e66f1fb71e graphicsdriver/opengl: Use glBufferSubData instead of glTexSubImage2D on browsers
Updates #988
2020-01-02 16:27:51 +09:00
Hajime Hoshi
de48a13a6e graphicsdriver/opengl/gl: Remove unused functions 2020-01-02 00:17:39 +09:00
Hajime Hoshi
38815ba801 graphicsdriver/opengl: Use glBufferSubData instead of glMapBuffer
We have confirmed that this does not slow down ReplacePixels.

Fixes #993
Fixes #1040
2020-01-02 00:01:27 +09:00
Hajime Hoshi
51f4ba1320 graphicsdriver/opengl: Refactoring 2020-01-01 01:57:12 +09:00
Hajime Hoshi
815afe6670 graphicsdriver/opengl: Reduce calls of glBindTexture 2020-01-01 01:39:45 +09:00
Hajime Hoshi
8285fbfac9 graphicsdriver/opengl: Add error checks 2019-12-31 04:22:28 +09:00
Hajime Hoshi
85cbc7e56b Enable to compile Ebiten on js/wasm with Go 1.14
Fixes #1024
2019-12-19 00:45:53 +09:00
Hajime Hoshi
a3343afc36 graphicsdriver/opengl/gl: Use pkg-config instead of LDFLAGS
Updates #1012
2019-12-11 03:00:25 +09:00
Hajime Hoshi
c9bc5913fd driver: Refactoring: Remove Graphics.Flush
Updates #226
2019-12-06 08:56:55 +09:00
Hajime Hoshi
7991ba4cfa graphicsdriver/metal: Bug fix: Failed to compile for iOS
The definition of BOOL is different between macOS and iOS. C's
bool is used on iOS, but C's bool is hard to use from Go (e.g.,
an integer cannot be converted to C's bool). Use unsigned char
instead.

Fixes #1006
2019-12-03 01:03:44 +09:00
Hajime Hoshi
0ec447e0d0 ui: Add SetScreenTransparent / IsScreenTransparent
Fixes #1001
2019-12-01 03:31:32 +09:00
Hajime Hoshi
a040aae83b glfw: Update to GLFW 3.3
Fixes #1000
2019-11-26 01:19:20 +09:00
Hajime Hoshi
21ba42325c graphicsdriver/opengl: Use smaller PBOs 2019-11-24 18:32:35 +09:00
Hajime Hoshi
78e912e30b graphicsdriver/opengl: Fix comments 2019-11-24 18:11:45 +09:00
Hajime Hoshi
3d3a1be1c4 graphicsdriver/opengl: Use glTexSubImage2D instead of glTexImage2D 2019-11-24 18:07:21 +09:00
Hajime Hoshi
9f483ddc60 graphicsdriver/opengl: Adopt WRITE_ONLY for PBOs
It looks like it is safe to use WRITE_ONLY:
https://stackoverflow.com/questions/30248594/write-only-glmapbuffer-what-if-i-dont-write-it-all
2019-11-24 17:42:28 +09:00
Hajime Hoshi
4c4f67197f graphicsdriver/opengl/gl: Bug fix: compile error on non-Windows (again) 2019-11-24 03:05:14 +09:00
Hajime Hoshi
ac6a3f0900 graphicsdriver/opengl/gl: Bug fix: compile error on non-Windows 2019-11-24 02:02:40 +09:00
Hajime Hoshi
0ef8009c11 graphicsdriver/opengl: Use uintptr whenever possible instead of unsafe.Pointer 2019-11-20 02:00:02 +09:00
Hajime Hoshi
4296c11256 graphicsdriver/opengl: Refactoring 2019-11-24 00:08:38 +09:00
Hajime Hoshi
3df198f68e graphicsdriver/opengl: Use GL_READ_WRITE at glMapBuffer
Updates #993
2019-11-22 00:27:20 +09:00
Hajime Hoshi
65fdf48cbf graphicsdriver: Refactoring: ReplacePixels takes multiple arguments
This reduces the number of graphics commands, and this works more
efficiently if the driver has an efficient way.
2019-11-21 23:52:12 +09:00
Hajime Hoshi
161771cc99 graphicsdriver/opengl: Refactoring 2019-11-20 12:23:45 +09:00
Hajime Hoshi
52f6be2639 graphicsdriver/opengl: Fix suspicious GL function calls
Before this change, the pixel object buffer is unbound just after
getting a pointer by glMapBuffer. This seemed suspicious.

This change fixes to do all pixel manipulations once between
glMapBuffer and glUnmapBuffer without changing a bound buffer.

This might fix a wrong rendering on some machines, but I am not
sure.

Updates #993
2019-11-20 02:41:34 +09:00