Hajime Hoshi
0593b77eb8
ui: Implement CurrentTPS
2018-07-18 02:11:00 +09:00
Hajime Hoshi
eb68cdad6e
ui: Bug fix: Freezing on calling SetVsyncEnabled
2018-07-17 02:37:22 +09:00
Hajime Hoshi
3a8ca5ad73
ui: Implement TPS/SetTPS
...
Fixes #605
Fixes #321
2018-07-17 01:58:00 +09:00
Hajime Hoshi
93f8c76310
internal/clock: Remove unused variables
2018-07-17 00:35:51 +09:00
Hajime Hoshi
408cc1e833
internal/clock: Refactoring
...
Update now returns 0 when tps is 0, and 1 when tps is negative.
2018-07-17 00:29:10 +09:00
Hajime Hoshi
88e6768a30
Use the term 'TPS' ticks per second
2018-07-16 04:36:47 +09:00
Hajime Hoshi
bbb777eecc
internal/clock: Use constant time to detect if the game is delayed too much
2018-07-16 03:02:55 +09:00
Hajime Hoshi
18ec1d8265
internal/clock: Update takes FPS
2018-07-16 01:03:23 +09:00
Hajime Hoshi
09c93ac86d
ui: Avoid using eval
2018-07-14 23:47:31 +09:00
Hajime Hoshi
e25c237a01
Add IsVsyncEnabled / SetVsyncEnabled
...
This enables the game to work more efficiently (but consume much
more CPU).
Fixes #405 .
2018-07-14 21:43:55 +09:00
Hajime Hoshi
6c8b7f8e9c
graphics: Refactoring: Reduce error propagations
2018-07-12 03:08:50 +09:00
Hajime Hoshi
a9a21132ae
graphics: Refactoring: Add pixelCommand
2018-07-12 02:40:06 +09:00
Hajime Hoshi
8f12dfc496
Use js.TypedArray
...
This is still WIP. There is a rendering issue on Wasm.
2018-07-06 02:48:51 +09:00
Hajime Hoshi
e4f157d9cd
opengl: Remove unused code
2018-06-30 12:34:40 +09:00
Hajime Hoshi
2c0f3d4302
opengl: Bug fix: wrong argument to js.Value.Call
2018-06-30 12:32:15 +09:00
Hajime Hoshi
6e51d31524
Use new GopherWasm API ( #634 )
...
I plan to merge this right after
https://github.com/gopherjs/gopherwasm/pull/3 is merged.
2018-06-30 00:02:15 +09:00
Hajime Hoshi
abdf52bc74
shareable: Bug fix: Call SetFinalizer whenever a new image is created
...
Fixes #637
2018-06-28 22:23:07 +09:00
Hajime Hoshi
f765966742
web: Remove unused variables
2018-06-28 00:17:05 +09:00
Hajime Hoshi
f19e349d38
web: Remove IsNodeJS
...
gjbt now creates a pseudo-Node environment by creating
window.process object, and this conflicted with an assumption that
Ebiten doesn't nothing on Node environment. See
https://github.com/myitcv/gjbt/pull/13 for the detail.
This change allows Ebiten work on pseudo-Node environment. Even
after this change, Ebiten doesn't work on real Node environment
due to lack of DOM.
2018-06-28 00:12:24 +09:00
Hajime Hoshi
dec921809b
shareable: Refactoring
2018-06-26 01:59:12 +09:00
Hajime Hoshi
a9359e4ef8
Use GopherJS/GopherWasm
2018-06-24 16:10:24 +09:00
Hajime Hoshi
8c9a11ddf4
opengl: Rely on gopherwasm for typed-array creation
2018-06-24 02:02:39 +09:00
Hajime Hoshi
ff86f8bd93
opengl: Refactoring
2018-06-23 04:43:56 +09:00
Hajime Hoshi
33e4f82d7c
graphicsutil: Optimization to avoid boundary checks
2018-06-23 03:18:54 +09:00
Hajime Hoshi
6c1c60d40d
opengl: Make Program struct to avoid Get()
2018-06-22 01:45:25 +09:00
Hajime Hoshi
55d832fc63
shareable: Don't extend textures on macOS
...
Fixes #593
2018-06-20 11:57:39 +09:00
Hajime Hoshi
d83799acf8
opengl: Bug fix: mobile build failure
2018-06-20 11:16:21 +09:00
Hajime Hoshi
8d644479cc
opengl: Initialize consts first to avoid 'Get' calls
2018-06-19 04:02:56 +09:00
Hajime Hoshi
62bd35e412
Avoid 'Get' call if possible
...
(*js.Value).Get has some overhead especially on Wasm.
2018-06-19 03:43:24 +09:00
Hajime Hoshi
702a429afb
opengl: Faster conversion from []float32 to Float32Array
2018-06-19 03:31:53 +09:00
Hajime Hoshi
840c4d24df
graphicsutil: Accept matrix parameters directly for performance
2018-06-19 00:19:32 +09:00
Philipp Steinhaus
39b3170185
input: Enable mouse wheel input ( #628 )
2018-06-18 00:38:30 +09:00
Hajime Hoshi
a3c754d2cc
graphics: Restrict QuadVertices to allow only power of 2 sizes
...
Now QuadVertices can skip calculating power of 2 values.
2018-06-17 23:05:19 +09:00
Hajime Hoshi
12287a8382
graphicsutil: Reduce multiplying
2018-06-17 20:11:31 +09:00
Hajime Hoshi
ac24a8382f
graphicsutil: Extract matrix applying for performance
2018-06-17 19:45:09 +09:00
Hajime Hoshi
1849b59741
graphicsutil: Refactoring
2018-06-17 17:29:36 +09:00
Hajime Hoshi
5d37c331bb
graphicsutil: Remove unused arguments
2018-06-17 16:38:21 +09:00
Hajime Hoshi
95561bbf6b
affine: Use float32 values for GeoM
...
float32 was slow on GopherJS, but not slow on Wasm.
2018-06-17 15:38:10 +09:00
Hajime Hoshi
4c2fc30311
graphicsutil: Don't allow nil GeoM
2018-06-17 01:48:56 +09:00
Hajime Hoshi
f6b7a6be73
graphics: Use copy function in appendVertices
2018-06-17 01:09:05 +09:00
Hajime Hoshi
b4ace53596
affine: Remove GeoM to avoid GeoM allocations on the heap
2018-06-17 00:59:50 +09:00
Hajime Hoshi
460c47a9eb
opengl: Pass slices to js.Value
2018-06-16 02:19:18 +09:00
Hajime Hoshi
3fbe8d8ecb
opengl: Change Shader/Program/Buffer to js.Value
2018-06-16 00:30:16 +09:00
Hajime Hoshi
2497b64cf7
opengl: Change uniformLocation to js.Value
2018-06-16 00:30:16 +09:00
Hajime Hoshi
17ccf06755
opengl: Change Texture/Framebuffer to js.Value
2018-06-16 00:30:16 +09:00
Hajime Hoshi
48e2c2aba9
opengl: Use gopherwasm
2018-06-16 00:30:16 +09:00
Hajime Hoshi
b87a851c0e
ui: New GopherWASM API
2018-06-16 00:26:28 +09:00
Hajime Hoshi
a90b7efdf4
shareable: Refactoring
2018-06-11 01:02:25 +09:00
Hajime Hoshi
3ee76ffd8e
graphicsutil: Move vertices.go to graphicsutil
2018-06-10 23:08:22 +09:00
Hajime Hoshi
9745ccee47
restorable: Make (*Image).DrawImage accept vertices and indices
2018-06-10 22:59:00 +09:00
Hajime Hoshi
97a54548df
restorable: Rename vertices -> quadVertices
2018-06-10 20:41:17 +09:00
Hajime Hoshi
600983e028
restorable: Record indices for restoring
2018-06-10 20:17:48 +09:00
Hajime Hoshi
2e5e7e6e24
restorable: Remove merging commands for code simplicity
2018-06-10 20:06:17 +09:00
Hajime Hoshi
03079ba067
restorable: Refactoring
2018-06-10 18:40:46 +09:00
Hajime Hoshi
c782380a1c
restorable: Specify indices from restorable package
2018-06-10 18:17:58 +09:00
Hajime Hoshi
2853895e6b
graphics: Refactoring: Rename functions
2018-06-10 17:53:57 +09:00
Hajime Hoshi
32ac3840a7
graphics: Add comments
2018-06-10 17:10:11 +09:00
Hajime Hoshi
4e21bfd005
graphics: Rename elements -> indices
2018-06-10 17:06:40 +09:00
Hajime Hoshi
8a268e871f
graphics: Specify indices before commands
2018-06-10 17:04:58 +09:00
Hajime Hoshi
be665a3526
ui: Better way to avoid blocking
...
Fixes #625
2018-06-09 13:36:35 +09:00
Hajime Hoshi
6e12f287b0
ui: Use goroutine to avoid blocking on GopherJS
2018-06-09 03:05:37 +09:00
Hajime Hoshi
e6d0943366
graphics: Rename color_matrix -> color_matrix_body
2018-06-06 02:46:54 +09:00
Hajime Hoshi
b86860abcc
graphics: Call BindBuffer only when the program was null
2018-06-04 00:13:23 +09:00
Hajime Hoshi
fac639f9b7
graphics: Refactoring: Remove drawImageCommand.quadsNum
2018-06-03 23:58:08 +09:00
Hajime Hoshi
c9dd04d471
graphics: Refactoring: Remove command groups
2018-06-03 23:13:01 +09:00
Hajime Hoshi
9d87622a19
graphics: Set elements for every EnqueueDrawImageCommand
2018-06-03 20:42:45 +09:00
Hajime Hoshi
525ad04568
graphics: Split the notion of vertices and elements
2018-06-03 16:07:26 +09:00
Hajime Hoshi
25f2dfc677
graphics: Refactoring
2018-06-03 01:43:10 +09:00
Hajime Hoshi
03e3f0f5f7
graphics: Call glBufferSubData for element array buffer every frame
...
This is a preparation for more flexible drawing commands.
2018-05-31 00:53:05 +09:00
Hajime Hoshi
5e93d75ae0
graphics: Fix comments
2018-05-28 02:38:26 +09:00
Hajime Hoshi
399f965729
opengl: Add BindBuffer accepting both element-array-buffer and array-buffer
...
This change is a pure refactoring to clarify that array buffer is
binded before its usage.
2018-05-28 00:34:00 +09:00
Hajime Hoshi
311788dfe2
ui: Remove warnings of deadlock
...
Now gopherwasm fixed this problem by avoiding js.MakeFunc.
See also: 3fe87b73c0
2018-05-27 04:10:14 +09:00
Hajime Hoshi
8e9c3bd304
ui: Use gopherwasm
2018-05-27 02:35:17 +09:00
Hajime Hoshi
faaf391619
audio: Give up syncing audio timer and game timer ( #617 )
...
Syncing was already incomplete (e.g. decoding takes more than one
frame and delays can happen in this case). Giving up syncing audio
timer and game timer should not affect the game experience so much.
Instead, clock implementation will be much simpler.
2018-05-27 00:30:12 +09:00
Hajime Hoshi
5976e4bbbc
audio: More intellegent suspending/resuming ( #617 )
...
Before this change, the audio is suspended when the game stops for
1/12[s]. However, as game often stops for more than 1/12[s]
especially on mobiles, this implemntation caused some audio
glitches.
This change fixes this problem by re-implementing suspending/
resumeing audio by detecting the window is active/focused or not.
2018-05-26 23:31:04 +09:00
Hajime Hoshi
d88d1be4ad
mobile: Refactoring
2018-05-26 22:51:30 +09:00
Hajime Hoshi
980055e07a
devicescale: Use gopherwasm
2018-05-25 02:00:41 +09:00
Hajime Hoshi
d894a13698
web: Use gopherwasm
2018-05-25 01:59:50 +09:00
Hajime Hoshi
2ec075004a
clock: Use gopherwasm
2018-05-25 01:14:31 +09:00
Hajime Hoshi
4c5613d73c
opengl: Remove unneeded casts
2018-05-23 01:29:16 +09:00
Hajime Hoshi
b84dc0585d
opengl: Remove dependencies on gopherjs/webgl
...
This is a preparation for #528
2018-05-23 00:48:24 +09:00
Hajime Hoshi
81a1fd4744
testflock: Use just sync.Mutex on browsers ( #615 )
2018-05-19 21:10:34 +09:00
Hajime Hoshi
0637a812bc
web: Fix detecting mobile browsers for NodeJS
2018-05-16 22:29:19 +09:00
Hajime Hoshi
a5eb1b84ab
web: Better way to detect NodeJS
2018-05-16 22:10:35 +09:00
Hajime Hoshi
c2df8326fc
ui: Refactoring: Use IsNodeJS
2018-05-16 22:02:33 +09:00
Hajime Hoshi
d7d892f2d6
graphics: Allow a little margin for edge pixels
2018-05-13 23:00:06 +09:00
Hajime Hoshi
a1dd7b39a3
graphics: Remove roundTexel function
...
Actually, at least 704d4cf464
,
examples/moire doesn't work well without roundTexel on MacBook Pro.
However, now other parts are fixed (e.g. highp is used), it looks
like roundTexel is no longer needed.
2018-05-13 22:30:22 +09:00
Hajime Hoshi
b402cddd01
graphics: Bug fix: wrong refactoring in shader
2018-05-13 14:20:54 +09:00
Hajime Hoshi
efaa5aa17a
graphics: Refactor shader
2018-05-13 03:31:28 +09:00
Hajime Hoshi
3ccfe087d9
Refactoring
2018-05-12 15:25:01 +09:00
Hajime Hoshi
453921f1d3
ui: Bug fix: sizeChange must be set after updateFullscreenScaleIfNeeded
2018-05-12 02:11:37 +09:00
Hajime Hoshi
f5336ce7bc
opengl: Use 'EXT' functions for framebuffers
...
Some pretty old machines don't support OpenGL 3.x or later, and in
such environment, some framebuffer functions like glGenFramebuffers
are not available. Instead, EXT versions can be used even on
machines that don't support OpenGL 3.x.
After this change, Ebiten always tries to use EXT version of
framebuffer functions. I believe EXT version is always available
when non-EXT version is available, so this chang eshould be safe.
Fixes #602
2018-05-10 02:11:23 +09:00
Hajime Hoshi
92631e64ed
Remove internal/sync
...
nosync package for GopherJS is problematic since nosync's mutex
assumes that Lock call is never duplicated, which is not true in
actual applications.
See also #603 .
2018-05-09 23:41:08 +09:00
Hajime Hoshi
167d21ec46
devicescale: Panic on Android when called from init funcs
2018-05-05 03:16:29 +09:00
Hajime Hoshi
d8dba69b47
ui: Add MonitorSize
...
Fixes #470
2018-05-05 02:42:45 +09:00
Hajime Hoshi
9a06b31556
ui: Don't panic at DeviceScaleFactor in init
...
Fixes #597
2018-05-05 01:28:29 +09:00
Hajime Hoshi
d41f959b96
ui: Initialize GLFW before Run
2018-05-04 23:55:23 +09:00
Hajime Hoshi
f1927d8aca
shareable: Add tests
2018-05-03 14:10:43 +09:00
Hajime Hoshi
03dcd94884
shareable: Bug fix: Don't mark disposed when the image becomes not shared
2018-05-03 11:49:55 +09:00
Hajime Hoshi
9efccea31c
ui: Add SetWindowTitle
...
Fixes #595
2018-05-02 19:21:17 +09:00
Hajime Hoshi
0e19aa558a
graphics: Remove unneeded GL calls
2018-05-02 01:12:17 +09:00
Hajime Hoshi
6a34b87a6c
opengl: Refactoring
2018-05-02 01:01:04 +09:00
Hajime Hoshi
ea1444ea7e
shareable: Add checks at operations for disposed images
2018-04-30 03:34:35 +09:00
Hajime Hoshi
9df977dff8
shareable: Add 'disposed' state instead of 'allocated' state
2018-04-30 03:30:10 +09:00
Hajime Hoshi
5dc1df3260
shareable: Fix tests
2018-04-29 19:15:04 +09:00
Hajime Hoshi
1f1847c259
shareable: Remove println
2018-04-29 19:10:36 +09:00
Hajime Hoshi
9c408dce7c
shareable: Lazy allocation ( #592 )
...
Clear is called when an image becomes a render target, and it
looks like Clear causes the memory spikes.
Before this change, when an image is created, shared region on a GL
texture is allocated. After that, the image's region is copied to
non-shared region when the image becomes a rendering target.
After this change, an image is not allocated on a GL texture first,
and allocated only when it is necessary. Then, Clear calls can be
avoided as much as possible.
2018-04-29 18:51:51 +09:00
Hajime Hoshi
916c7aac8a
restorable: Fix comments
2018-04-29 13:49:33 +09:00
Hajime Hoshi
45afb6db67
Reland: restorable: Merge Clear to ReplacePixel
2018-04-29 13:40:18 +09:00
Hajime Hoshi
613f384cb5
graphics: Add EBITEN_DUMP_IMAGES_KEY
...
Fixes #589
2018-04-28 22:08:20 +09:00
Hajime Hoshi
eb357f61b5
restorable: Bug fix: Calling At must resolve the image's stale state
2018-04-28 21:56:20 +09:00
Hajime Hoshi
b22cc9d4be
Add periods after 'DO NOT EDIT'
2018-04-28 03:37:19 +09:00
Hajime Hoshi
0bc712422f
restorable: Bug fix: Remove SetFinalizer for disposing
...
SetFinalizer causes concurrent issue
2018-04-27 12:08:59 +09:00
Hajime Hoshi
dff492955d
shareable: Reset finalizer in any cases
2018-04-26 01:51:57 +09:00
Hajime Hoshi
1cf4f30541
Revert "restorable: Merge Clear to ReplacePixels"
...
This reverts commit fb641d88cd
.
Reason: When restoring the image where ReplacePixels is called,
dummyImage might not be restored since there is no record of
relationships between this image and dummyImage. Now pixels is not
nil when reverting by chance, but this would cause problems in the
future.
2018-04-25 22:31:48 +09:00
Hajime Hoshi
fb641d88cd
restorable: Merge Clear to ReplacePixels
...
This can avoid unnecessary stale images that requires loading
pixels from GPU.
2018-04-25 01:30:57 +09:00
Hajime Hoshi
1571e04753
Revert "graphics: Call glFlush after glTexSubImage2D for MacBook Pro"
...
This reverts commit 7f5719fadd
.
Reason: This didn't change the situation
2018-04-22 22:06:38 +09:00
Jake Bentvelzen
2f4ca72dbd
input: Add Pause and Print Screen buttons ( #555 )
...
Fixes #579
2018-04-21 09:36:28 -07:00
Hajime Hoshi
3fa2beb502
Fix the do-not-edit comment https://golang.org/s/generatedcode
2018-04-20 00:54:33 -07:00
Hajime Hoshi
b691e73342
Revert "graphics: Experimental fix: call glFlush always after glTexSubImage2D"
...
This reverts commit d2da77eb96
.
Reason: This doesn't solve the issue on MacBook Late 2013.
2018-04-14 23:16:26 +09:00
Hajime Hoshi
d2da77eb96
graphics: Experimental fix: call glFlush always after glTexSubImage2D
2018-04-14 23:06:20 +09:00
Hajime Hoshi
7f5719fadd
graphics: Call glFlush after glTexSubImage2D for MacBook Pro
2018-04-14 17:59:10 +09:00
Hajime Hoshi
d1ef57c280
input: Remove the last period from do-not-edit comment
2018-04-14 04:22:09 +09:00
Hajime Hoshi
61d4df0e04
input: Add numpad keys for Edge ( #580 )
2018-04-14 02:43:31 +09:00
Hajime Hoshi
dd6110fbf8
input: Add KeyNumLock ( #580 )
2018-04-14 02:43:26 +09:00
Hajime Hoshi
5229e5a713
input: Add numpad keys except for Edge browser ( #580 )
2018-04-14 02:43:21 +09:00
Hajime Hoshi
4708d4a6f9
Add internal/png
2018-04-10 04:17:41 +09:00
Hajime Hoshi
070c8ec737
shareable: Rename variables
2018-04-09 02:18:46 +09:00
Hajime Hoshi
899f007fd0
ui: Panic when error is found on mobile
2018-04-07 03:33:20 +09:00
Hajime Hoshi
2d3c6ab5b8
ui: Remove build tag 'gomobilebuild'
...
Fixes #573
2018-04-07 02:14:54 +09:00
Hajime Hoshi
9902497e3d
test: Use flock to make tests exclusive
...
Fixes #575
2018-04-07 00:59:52 +09:00
Hajime Hoshi
e77eb9f80f
shareable: Temporary disable tests ( #575 )
2018-04-06 03:47:05 +09:00
Hajime Hoshi
cc725b99af
restorable: Replace emptyImage with dummyImage
2018-04-06 03:08:52 +09:00
Hajime Hoshi
70f16daafd
restorable: Fix tests (wrong assumption was used)
2018-04-06 02:15:49 +09:00
Hajime Hoshi
7b5ad46e49
shareable: NewImage* now returns a cleared image
2018-04-06 02:08:12 +09:00
Hajime Hoshi
1a335032a2
shareable: Bug fix: backend's restorable image must be disposed
2018-04-06 01:12:08 +09:00
Hajime Hoshi
8ff79c970a
shareable: Use defer for tests
2018-04-05 12:02:08 +09:00
Hajime Hoshi
24e20306f2
restorable: Move 'putting random-colored dot' to restorable
2018-04-05 11:18:28 +09:00
Hajime Hoshi
810dc33b4a
shareable: Fix comments
2018-04-05 02:41:50 +09:00
Hajime Hoshi
15dcd5764d
shareable: Add shareable_test
2018-04-05 02:35:30 +09:00
Hajime Hoshi
6680b4f8d5
shareable: Bug fix: wrong source image rect in ensureNotShared
2018-04-05 01:07:36 +09:00
Hajime Hoshi
92e5bc31dc
shareable: Refactoring
2018-04-05 00:40:35 +09:00
Hajime Hoshi
fcf4657a70
ui: Adjust touch positions at ui package (mobile)
2018-04-03 01:50:07 +09:00
Hajime Hoshi
76cb43a7f8
input: Refactoring: Remove unused arguments
2018-04-03 01:21:52 +09:00
Hajime Hoshi
0f2beab260
ui: Adjust touch positions in ui package (js)
2018-04-03 00:53:09 +09:00
Hajime Hoshi
c540d0fc0d
ui: Add AdjustedTouches for consistency
2018-04-02 01:54:44 +09:00
Hajime Hoshi
e44a930bbb
input: Refactoring
2018-04-02 01:19:42 +09:00
Hajime Hoshi
7d2fd9654a
input: Adjust mouse cursor position in ui package
2018-04-01 23:53:26 +09:00
Hajime Hoshi
4de2dc0240
Add input package
2018-04-01 23:20:45 +09:00
Hajime Hoshi
e14c05b0fe
shareable: Add comments
2018-03-26 00:13:26 +09:00
Hajime Hoshi
ab7a3e1ab3
graphics: Remove unneeded mutex
2018-03-25 23:55:38 +09:00
Hajime Hoshi
c767c0631e
restorable: Remove unneeded mutex
2018-03-25 23:40:39 +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
ce8b9283a1
Re^2-land: shareable: Implement extending shareable texture again
2018-03-25 22:41:15 +09:00
Hajime Hoshi
125e5c4f32
restorable: Bug fix: Image must be protected with locks ( #567 )
2018-03-25 22:31:51 +09:00
Hajime Hoshi
e2632e358e
restorable: Add TestDoubleResolve
2018-03-25 21:09:26 +09:00
Hajime Hoshi
025fd00e6b
restorable: Bug fix: Make the image stale when pixels are partly replaced
2018-03-25 20:39:06 +09:00
Hajime Hoshi
fc47d2843a
restorable: Add TestRestoreChain2
2018-03-25 19:43:32 +09:00
Hajime Hoshi
c0b1919020
opengl: Refactoring: More similar way to golang.org/x/mobile/app
2018-03-25 18:23:34 +09:00
Hajime Hoshi
c47b549fd1
restorable: Refactoring: Make functions more atomic
2018-03-25 18:21:43 +09:00
Hajime Hoshi
99f72a1b64
restorable: Bug fix: commands must be flushed at At
2018-03-25 01:26:43 +09:00
Hajime Hoshi
8149ace52c
restorable: Add TestDispose
2018-03-25 00:50:11 +09:00
Hajime Hoshi
0acf021e03
restorable: Dispose images explicitly when restoring ( #567 )
2018-03-24 23:27:08 +09:00
Hajime Hoshi
1616373819
restorable: Ensure the given image is not nil at makeStaleIfDependingOn
2018-03-24 21:57:22 +09:00
Hajime Hoshi
b15fb523a8
shareable: Rename variables
2018-03-24 04:27:10 +09:00
Hajime Hoshi
b92bc6f21c
Revert "shareable: Implement extending shareable texture again"
...
This reverts commit b474946619
.
Reason: #567
2018-03-24 04:23:00 +09:00
Hajime Hoshi
2110191794
mobile: Accept gomobile build ( #249 )
2018-03-24 02:52:42 +09:00
Hajime Hoshi
9009b293e5
graphics: Remove type assertion
2018-03-21 16:51:27 +09:00
Hajime Hoshi
23c2fc0134
Revert "graphics: Remove type assertion"
...
This reverts commit ff331d031a
.
Compile error
2018-03-21 16:48:51 +09:00
Hajime Hoshi
ff331d031a
graphics: Remove type assertion
2018-03-21 16:45:57 +09:00
Hajime Hoshi
09166a6c42
graphics: Fix shaders cleaner way
2018-03-21 03:36:36 +09:00
Hajime Hoshi
0a5deab0a2
graphics: Reland Bug fix: More strict calculation for the nearest filter ( #558 )
...
Better version of bae8f9d874
2018-03-21 02:40:26 +09:00
Hajime Hoshi
b8025d06f8
opengl: Specify texture wrap (CLAMP_TO_EDGE)
2018-03-21 02:27:11 +09:00
Hajime Hoshi
b157f2d6d0
Revert "graphics: Bug fix: More strict calculation for the nearest filter ( #558 )"
...
This reverts commit bae8f9d874
.
Reason: TravisCI failed
2018-03-20 04:16:37 +09:00
Hajime Hoshi
a40dc5cf22
graphics: Refactoring shader
2018-03-20 04:05:09 +09:00
Hajime Hoshi
bae8f9d874
graphics: Bug fix: More strict calculation for the nearest filter ( #558 )
2018-03-20 04:05:03 +09:00
Hajime Hoshi
aaa603dd08
Revert "Revert "shareable: Avoid unneeded extending images""
...
This reverts commit 96b9f09058
.
Fixes #561
2018-03-20 02:15:49 +09:00
Hajime Hoshi
3e929de08a
shareable: Revert extending images
...
Fixes #562
2018-03-20 02:14:04 +09:00
Hajime Hoshi
be4e3ab801
restorable: Bug fix: partial ReplacePixels broke the image state ( #562 )
2018-03-20 02:14:00 +09:00
Hajime Hoshi
9d37221743
restorable: Refactoring
2018-03-19 23:55:06 +09:00
Hajime Hoshi
927a4388b5
graphics: Bug fix: rounding texels is required even on the nearest filter
...
Fixes #558
2018-03-19 10:37:18 +09:00
Hajime Hoshi
d421648e57
shareable: Bug fix: workaround to fix #562 by disabling extending
2018-03-19 03:26:31 +09:00
Hajime Hoshi
96b9f09058
Revert "shareable: Avoid unneeded extending images"
...
This reverts commit ce4e00ff79
.
Reason: #560
2018-03-19 02:28:17 +09:00
Hajime Hoshi
b5d065151a
restorable: Don't flatten vertices until actually needed
2018-03-18 23:54:45 +09:00
Hajime Hoshi
de3a8d8893
restorable: Remove comments
2018-03-18 18:14:11 +09:00
Hajime Hoshi
5ec5cf2450
ui: Add comments
2018-03-17 18:34:20 +09:00
Hajime Hoshi
526fbd3619
ui: Implement SetWindowDecorated and IsWindowDecorated
...
Fixes #430 .
2018-03-17 18:30:55 +09:00
Hajime Hoshi
ce4e00ff79
shareable: Avoid unneeded extending images
2018-03-17 17:41:36 +09:00
Hajime Hoshi
e7925a12bd
shareable: Refactoring
2018-03-16 01:21:33 +09:00
Hajime Hoshi
1b0e71765f
internal/hooks: Rename Update -> BeforeUpdate
2018-03-15 02:50:10 +09:00
Hajime Hoshi
61d7f1e9b5
affine: Bug fix: (*GeoM).det() was wrong ( #547 )
2018-03-12 11:11:53 +09:00
Hajime Hoshi
c2872017ab
affine: Add GeoM.Invert, IsInvertible ( #547 )
2018-03-11 19:13:39 +09:00
Hajime Hoshi
efea65ee58
graphics: Bug fix: wrong texels were used ( #546 )
2018-03-11 04:11:49 +09:00
Hajime Hoshi
b474946619
shareable: Implement extending shareable texture again
...
Related to #509
2018-03-11 01:36:47 +09:00
Hajime Hoshi
c37dd9d961
packing: Add Extend
2018-03-11 01:13:53 +09:00
Hajime Hoshi
48408cba11
shareable: Bug fix: Protect critical sections
2018-03-11 00:38:49 +09:00
Hajime Hoshi
c411ca492f
shareable: Set finalizers
2018-03-11 00:07:32 +09:00
Hajime Hoshi
a2d6ae7eee
shareable: Rename ImagePart -> Image
2018-03-11 00:05:06 +09:00
Hajime Hoshi
6c6b25647a
shareable: Rename Image -> backend
2018-03-11 00:02:23 +09:00
Hajime Hoshi
df3960a97c
Add internal/shareable
2018-03-10 23:59:26 +09:00
Hajime Hoshi
9555e83589
packing: Add IsEmpty tests
2018-03-10 21:27:11 +09:00
Hajime Hoshi
6c9d9dbaff
packing: Improve test errors
2018-03-10 21:02:04 +09:00
Hajime Hoshi
1583cd0f7b
packing: Enable to specify max size of a page
2018-03-10 20:53:20 +09:00
Hajime Hoshi
9c72671232
Revert "packing: Add Extend"
...
This reverts commit 1dd32066d2
.
Reason: #542
2018-03-09 16:02:57 +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
0418ce0761
graphics: Refactoring: Remove duplication of checking image size
2018-03-09 11:04:02 +09:00
Hajime Hoshi
4628154478
graphics: Remove unused flipY member
2018-03-09 03:26:14 +09:00
Hajime Hoshi
00d8e793d9
restorable: Remove MaxImageSize
2018-03-09 02:50:38 +09:00
Hajime Hoshi
2c62e64a9e
Revert "internal/graphics: increase defaultViewportSize to 8192 ( #538 )"
...
This reverts commit a60976f260
Per #541 .
2018-03-09 02:13:44 +09:00
Hajime Hoshi
bc8a96eda7
graphicsutil: Avoid duplicated copying
...
Fixes #521
2018-03-09 01:00:23 +09:00
Hajime Hoshi
4c7025a05f
graphicsutil: Add tests
2018-03-09 00:19:10 +09:00
Hajime Hoshi
2dc4f3fdf0
opengl: Remove FillFramebuffer
...
Fixes #536
2018-03-08 12:01:24 +09:00
Andrew Gerrand
a60976f260
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
2018-03-08 11:53:49 +09:00
Hajime Hoshi
ef5de62780
Follow the standard comment rule
...
See https://golang.org/s/generatedcode
2018-03-08 02:47:59 +09:00
Hajime Hoshi
86be32dfb5
packing: Add comments
2018-03-08 00:18:28 +09:00
Hajime Hoshi
1dd32066d2
packing: Add Extend
2018-03-08 00:14:51 +09:00
Hajime Hoshi
8ac2ebde1e
packing: Rename tests
2018-03-07 02:29:11 +09:00
Hajime Hoshi
951568e403
packing: Refactoring
2018-03-06 02:52:36 +09:00
Hajime Hoshi
7e70d5ca69
Rename bsp -> packing
2018-03-06 00:38:56 +09:00
Hajime Hoshi
8d98f297f2
graphics: Refactoring: Avoid type switch
2018-03-05 00:00:25 +09:00
Hajime Hoshi
f1ba3e5894
affine: Optimization Equals
2018-03-04 23:23:11 +09:00
Hajime Hoshi
3479b80f1c
opengl: Use unsafe-way to convert []float32/[]uint16 to []byte; Remove internal/endian
2018-03-04 18:06:35 +09:00
Hajime Hoshi
7da65d64be
bsp: Make bsp concurrent safe
...
Fixes #530 . Finalizers can be called on different goroutines
2018-03-04 02:33:32 +09:00
Hajime Hoshi
8dbb11a23c
graphicsutil: Remove Gosched that might be harmful on browsers
...
This was introduced at 006f87d02b
but this can be harmful when many images are created by NewImageFromImage
2018-03-03 23:43:57 +09:00
Hajime Hoshi
08610fcd8b
bsp: Fix tests
2018-03-03 23:30:59 +09:00
Hajime Hoshi
4ae9d5780c
graphics: Implement shared texture ( #514 )
2018-03-03 19:54:53 +09:00
Hajime Hoshi
247cd6e1c3
Add graphicsutil package
2018-03-02 12:34:56 +09:00
Hajime Hoshi
d4112004b0
graphics: Move calculating source region from restorable package
2018-03-02 12:20:44 +09:00
Hajime Hoshi
d0592d30e0
graphics: Improve clearing the offscreen performance
2018-03-02 01:55:40 +09:00
Hajime Hoshi
e5089934db
graphics: Bug fix: Don't delete buffers on browsers ( #526 )
2018-03-02 01:06:21 +09:00
Hajime Hoshi
4c1cc9e699
ui: Bug fix: exit update function once when the context is lost ( #526 )
2018-03-02 01:05:54 +09:00
Hajime Hoshi
dada2e060a
restorable: Bug fix: Don't use graphics.Image for clearing framebuffer
2018-03-02 01:05:54 +09:00
Hajime Hoshi
cd8368deaf
restorable: Add TODO comment
2018-03-02 00:00:09 +09:00
Hajime Hoshi
db738676ce
restorable: Refactoring: clearIfVolatile
2018-03-01 23:13:23 +09:00
Hajime Hoshi
b8deabbd94
graphics: Reland: Bug fix: a too old frame was rendered at least on Android
...
Fixes #525
2018-03-01 23:05:28 +09:00
Hajime Hoshi
1a898dd1b9
Add comments
2018-03-01 02:49:45 +09:00
Hajime Hoshi
676a023a30
restorable: Remove unneeded NextPowerOf2Int usage
2018-03-01 02:45:23 +09:00
Hajime Hoshi
1068156215
restorable: Add restoring case to TestReplacePixels
2018-03-01 02:43:59 +09:00
Hajime Hoshi
127f6c09c8
graphics: Specify rect to glTexSubImage2D
2018-03-01 01:58:09 +09:00
Hajime Hoshi
9f6fd0db9a
graphics: Use the original width/height for glTexSubImage2D
2018-03-01 00:47:37 +09:00
Hajime Hoshi
15d2e6b82b
graphics: Fix comments
2018-02-28 23:40:43 +09:00
Hajime Hoshi
c624359163
graphics: Remove glClear before glTexSubImage2D, that is no longer needed
2018-02-28 23:35:05 +09:00
Hajime Hoshi
02b4fc7917
graphics: Reduce num of Image.Clear() calls
2018-02-28 23:11:12 +09:00
Hajime Hoshi
9db042ae9e
graphics: Refactoring: easier way to clear framebuffer
2018-02-28 22:46:57 +09:00
Hajime Hoshi
8ef0f1ac6a
restorable: Avoid unneeded discarding images
2018-02-28 15:56:51 +09:00
Hajime Hoshi
dca60a2520
affine: Make initial affine.GeoM{} value identity (again)
2018-02-28 02:38:57 +09:00
Hajime Hoshi
1a2a108639
affine: Add comments
2018-02-28 02:21:07 +09:00
Hajime Hoshi
2f1908b05c
restorable: Use nil instead of empty affine.ColorM
2018-02-28 02:14:10 +09:00
Hajime Hoshi
ccd9241b07
affine: Refactoring ColorM
2018-02-28 02:14:09 +09:00
Hajime Hoshi
8c8e512059
affine: User nillable pattern for ColorM
2018-02-28 02:14:06 +09:00
Hajime Hoshi
bea63946fc
affine: Bug fix: ColorM.Apply was wrong when alpha is 0
2018-02-27 12:16:16 +09:00
Hajime Hoshi
adbd0db765
restorable: Accept source rect and geom instead of vertices
2018-02-27 01:35:30 +09:00
Hajime Hoshi
2bd099014b
affine: Remove geoMImpl and use nillable pattern
2018-02-27 01:02:53 +09:00
Hajime Hoshi
f953afc518
internal/bsp: Refactoring
2018-02-26 11:26:32 +09:00
Hajime Hoshi
798a826e50
internal/bsp: Allow 1 pixel
2018-02-26 11:21:50 +09:00
Hajime Hoshi
ed2bd6defc
internal/bsp: Fix algorithm
2018-02-26 11:20:20 +09:00
Hajime Hoshi
519a75e5a8
restorable: Bug fix: Clearing framebuffers was not complete
2018-02-25 23:53:27 +09:00
Hajime Hoshi
86671f3337
opengl: Remove pixels argument from NewTexture
2018-02-25 23:34:34 +09:00
Hajime Hoshi
85b133dad0
graphics: Remove NewImageFromImage command
2018-02-25 23:22:49 +09:00
Hajime Hoshi
9adc1ac6a0
Revert "graphics: Refactoring: clearing framebuffer"
...
This reverts commit 58f5c9c1d0
.
Fixes #515
2018-02-25 22:04:04 +09:00
Hajime Hoshi
b88b86e0e7
Add internal/bsp ( #514 )
2018-02-25 21:26:12 +09:00
Hajime Hoshi
0cc456b534
ui: Rename sizeChanged -> toChangeSize
2018-02-25 00:44:45 +09:00
Hajime Hoshi
04341a014c
ui: Add comments
2018-02-25 00:44:41 +09:00
Hajime Hoshi
58f5c9c1d0
graphics: Refactoring: clearing framebuffer
2018-02-24 23:51:05 +09:00
Hajime Hoshi
a2d40e0908
graphics: Remove offsetX/offsetY from framebuffer
2018-02-24 23:35:55 +09:00
Hajime Hoshi
c5d1f11d95
graphics: Remove unused argument from projectionMatrix
2018-02-24 23:33:28 +09:00
Hajime Hoshi
9da5099060
graphics: Refactoring: Flip Y by geometry matrix instead of projection matrix
2018-02-24 23:32:36 +09:00
Hajime Hoshi
a644e92298
restorable: Better calculation to clear restorable.Image
2018-02-24 21:16:30 +09:00
Hajime Hoshi
da20b3f49a
restorable: Bug fix: Clear screen framebuffer on fullscreen mode
...
Fixes #513
2018-02-24 20:48:47 +09:00
Hajime Hoshi
692f36f664
graphics: Add comments
2018-02-24 20:40:26 +09:00
Hajime Hoshi
78a58fd1ae
ui: Bug fix: userInterface.fullscreen() must be called from the main thread
2018-02-24 18:10:39 +09:00
Hajime Hoshi
b58dc26832
graphics: Remove fillCommand
2018-02-24 16:19:43 +09:00
Hajime Hoshi
fe7aae32a0
restorable: Remove graphics.Image.Fill usage
2018-02-24 16:18:18 +09:00
Hajime Hoshi
2ba89591db
restorable: Remove Fill
2018-02-24 15:14:53 +09:00
Hajime Hoshi
a87f197c1b
ui: Add TODO
2018-02-24 14:50:45 +09:00
Hajime Hoshi
af64f8689a
graphics: Fix screen filter calculation
2018-02-24 04:25:07 +09:00
Hajime Hoshi
9fba60ca03
Revert "graphics: Adjust texel positions for consitency"
...
This reverts commit 816fb314a4
.
2018-02-24 01:52:49 +09:00
Hajime Hoshi
816fb314a4
graphics: Adjust texel positions for consitency
...
On second thought, given pixel coords represent a center of texels...
2018-02-24 01:52:05 +09:00
Hajime Hoshi
7c66d884d4
graphics: Adjusting position is no longer needed
...
Now pixel position is treated as left-upper in linear filter
2018-02-24 01:32:48 +09:00
Hajime Hoshi
e5a2cf29c0
graphics: Bug fix: pixel coord is upper-left by default
2018-02-24 01:16:32 +09:00
Hajime Hoshi
c76ff5ceb2
graphics: Bug fix: fix screen filter calculation
...
Fixes #512
2018-02-23 23:13:20 +09:00
Hajime Hoshi
2507379494
restorable: Skip resolving stale images when possible
2018-02-23 03:19:20 +09:00
Hajime Hoshi
b036cac616
graphics: Fix screen filter calculation
2018-02-23 02:36:12 +09:00
Hajime Hoshi
591e0ad995
graphics: Add 'screen' filter for fast rendering ( #509 )
2018-02-23 01:28:35 +09:00
Hajime Hoshi
092cb2f3f6
graphics: Reset source size parameter just in case
2018-02-22 11:27:15 +09:00
Hajime Hoshi
d4b8b99784
ui: Bug fix: return is needed for Edge case
...
Fixes #507
2018-02-21 21:53:49 +09:00
Hajime Hoshi
30e48d5c3c
graphics: Stop unnecessary copy of elements (projection matrix)
2018-02-20 01:36:56 +09:00
Hajime Hoshi
40b1948baa
graphics: Stop unnecessary copy of elements
2018-02-20 01:17:21 +09:00
Hajime Hoshi
f1f7e5bcec
affine: Transpose ColorM implementation for optimization
2018-02-20 00:53:53 +09:00
Hajime Hoshi
9b361086d7
affine: Use float32 inside of ColorM
2018-02-20 00:33:56 +09:00
Hajime Hoshi
2db1753503
opengl: Remove struct usages to avoid copying (texture)
2018-02-19 02:49:00 +09:00
Hajime Hoshi
f85c846596
opengl: Remove invalidFramebuffer and use nil instead
2018-02-19 02:22:05 +09:00
Hajime Hoshi
1154fcf470
opengl: Remove unused casts
2018-02-19 02:20:28 +09:00
Hajime Hoshi
2936ea5080
opengl: Remove struct usages to avoid copying (framebuffer)
2018-02-19 02:18:56 +09:00
Hajime Hoshi
9400720ddf
opengl: Remove struct usages to avoid copying (shader)
2018-02-19 02:06:06 +09:00
Hajime Hoshi
9dc68289b8
opengl: Remove struct usages to avoid copying (buffer)
2018-02-19 02:03:01 +09:00
Hajime Hoshi
c6cf8e5184
opengl: Remove struct usages to avoid copying (program)
2018-02-19 01:45:03 +09:00
Hajime Hoshi
2fbfd0bdcb
opengl: Remove struct usages to avoid copying
2018-02-19 01:38:17 +09:00
Hajime Hoshi
896a47b2ee
affine: Reduce copying cost of GeoM
2018-02-18 23:39:24 +09:00
Hajime Hoshi
6ef4bbde2d
graphics: Add FilterDefault; Make DrawImageOptions specify Filter ( #453 )
2018-02-14 02:59:44 +09:00
Hajime Hoshi
929dfa1cfb
affine: Implement ColorM.Add for backward compatibility: Don't use this anyway
2018-02-13 03:06:19 +09:00
Hajime Hoshi
cc423c276d
ui: Avoid creating empty slice at Touches
2018-02-12 20:23:24 +09:00
Hajime Hoshi
7d9b901ab3
ui: Avoid creating empty slice at GamepadIDs
2018-02-12 20:20:39 +09:00
Hajime Hoshi
95480d0644
affine: Separate ColorM impl into two slices
...
This fix avoids unnecessary allocating arrays.
2018-02-12 19:01:01 +09:00
Hajime Hoshi
392ee92aeb
Add internal/hooks to replace internal/audiobinding
2018-02-04 17:33:17 +09:00
Hajime Hoshi
e3023889ac
ui: Change RegularTermination to a value
2018-02-04 00:22:38 +09:00
Hajime Hoshi
24d7487fc7
graphics: Bug fix: TestImageTooManyFill didin't pass on some machines (reland)
...
Fixes #492
2018-02-03 23:03:18 +09:00
Hajime Hoshi
9ece27e7e8
Revert "graphics: Bug fix: TestImageTooManyFill didin't pass on some machines"
...
This reverts commit 7cb7b7b4ff
.
2018-02-03 20:39:33 +09:00
Hajime Hoshi
7cb7b7b4ff
graphics: Bug fix: TestImageTooManyFill didin't pass on some machines
...
Fixes #492
2018-02-03 20:36:16 +09:00
Hajime Hoshi
595e654123
graphics: Bug fix: pixels read from GPU might include errors ( #492 )
2018-02-03 16:43:42 +09:00
Hajime Hoshi
65b71ad79d
restorabel: uint8 -> byte
2018-02-03 16:36:43 +09:00
Hajime Hoshi
4bbb4b0445
graphics: Remove unneeded comments ( #491 )
2018-02-03 03:32:03 +09:00
Hajime Hoshi
52350c1b1b
graphics: Bug fix: TestImageEdge failed on MacBook Pro ( #491 )
2018-02-03 03:30:09 +09:00
Hajime Hoshi
beaa060ce3
graphics: Adjust texel values that can be exactly on the edges of the source rect ( #491 )
2018-02-03 02:07:46 +09:00
Hajime Hoshi
8b2ed6cddd
ui: Update GraphicsContext every frame ( #490 )
2018-02-02 02:08:03 +09:00
Hajime Hoshi
80596820cf
graphics: Replace []uint8 with []byte
2018-01-28 22:40:36 +09:00
seebs
0b7ba8e573
Do GeoM projection on CPU ( #477 )
...
Handling GeoM projection on CPU may seem like a weird choice, given
how fast GPU is, but it pays off:
* You only have to do a very small subset of the actual matrix
multiply.
* You don't have to construct a matrix in the vertex shader.
* Six fewer float32 values per vertex.
* You do still have to do the matrix computation for each vertex,
though.
Signed-off-by: Seebs <seebs@seebs.net>
2018-01-14 16:01:55 +09:00
Hajime Hoshi
38c72faf95
ui: Deprecate SetCursorVisibility and add SetCursorVisible ( #407 )
2018-01-09 02:01:33 +09:00
Hajime Hoshi
d8c0d88960
clock: Add comments
2018-01-07 21:12:25 +09:00
Hajime Hoshi
1e33cbb66f
clock: Remove limitation of the number of frames to be updated
2018-01-07 20:20:02 +09:00
Hajime Hoshi
d5d5ebb0b3
clock: Make ProceedAudioTimer take a number of frames
2018-01-07 18:32:19 +09:00
Hajime Hoshi
d12a3d4073
clock: Refactoring
2018-01-07 17:10:56 +09:00
Hajime Hoshi
0a911b28b2
ui: Remove unneeded variable deviceScale
2018-01-07 14:51:25 +09:00
Hajime Hoshi
34d2e9a3fb
ui: Remove unused function
2018-01-07 05:25:29 +09:00
Hajime Hoshi
0469ef386b
ui: Fix comment
2018-01-06 23:53:35 +09:00
Hajime Hoshi
4bcb2e5682
devicescale: Rename XFCE -> Xfce
2018-01-04 17:16:02 +09:00
Hajime Hoshi
ee87a0fd71
devicescale: Add other desktops
2018-01-04 03:29:58 +09:00
Hajime Hoshi
75f5cbd45a
devicescale: Rename windowManager -> desktop
2018-01-04 03:22:30 +09:00
Hajime Hoshi
60993fe3ea
devicescale: Rename files
2018-01-04 03:19:19 +09:00
Hajime Hoshi
738d23cf51
devicescale: Bug fix: need to parse XDG_CURRENT_DESKTOP for GNOME classic
2018-01-04 00:55:53 +09:00
Hajime Hoshi
70f9fee8af
devicescale: Detect window manager
2018-01-04 00:01:41 +09:00
Hajime Hoshi
eac5564342
devicescale: Fix scaling on UNIX
2018-01-03 23:38:47 +09:00
Hajime Hoshi
9ec0785203
Rename files _xwindow.go to _unix.go
2018-01-03 23:38:47 +09:00
Hajime Hoshi
edaaa178b8
devicescale: Implement scaling for Gnome and Cinnamon ( #344 )
2018-01-03 23:36:33 +09:00
Hajime Hoshi
a64367f906
ui: Refactoring: remove an unneeded member
2018-01-03 17:35:34 +09:00
Hajime Hoshi
5a17497723
devicescale: Make DeviceScale concurrent-safe
2018-01-03 16:52:26 +09:00
Hajime Hoshi
0f450fb1e2
devicescale: Use NewLazyDLL on Windows
2018-01-03 16:24:53 +09:00
Hajime Hoshi
7b759faf36
devicescale: Bug fix: SetProcessDPIAware needs to be called
2018-01-03 15:43:56 +09:00
Hajime Hoshi
c82809867d
Add internal/devicescale
2018-01-03 05:22:56 +09:00
Hajime Hoshi
9578307d7b
ui: Organize members
2018-01-03 00:23:18 +09:00
Hajime Hoshi
9478801076
ui: Implement SetScreenSize/Scale for mobiles
...
Fixes #250
2017-12-31 21:01:48 +09:00
Hajime Hoshi
5d4c4f1283
graphics: Bug fix: Don't delete the screen framebuffer (iOS)
2017-12-31 20:55:04 +09:00
Hajime Hoshi
473aeaa8b1
ui: Remove unneeded early return
2017-12-31 18:37:04 +09:00
Hajime Hoshi
c636dec721
graphics: Remove glFlush() for performance
2017-12-21 03:19:28 +09:00
Hajime Hoshi
e13bb0769b
graphics: Add 'not-reached' clause
2017-12-21 00:57:36 +09:00
Hajime Hoshi
0a99103bc1
graphics: Call roundTexel only on linear filter ( #461 )
2017-12-21 00:38:22 +09:00
Hajime Hoshi
8e72906f3d
graphics: Separate GLSL programs for filters ( #461 )
2017-12-21 00:33:08 +09:00
Hajime Hoshi
f072e8f1c5
graphics: Optimize GLSL
2017-12-18 03:10:04 +09:00
Hajime Hoshi
9471e3e4e7
web: Bug fix: Expose IsAndroidChrome
2017-12-17 01:22:22 +09:00
Hajime Hoshi
44dc9f6220
graphics: Optimize fragment shader
2017-12-16 18:35:45 +09:00
Hajime Hoshi
6eb148b9a1
graphics: Fragment shader optimization ( #461 )
2017-12-16 05:05:21 +09:00
Hajime Hoshi
078d107c24
graphics: Bug fix: vertex position should be highp
2017-12-16 03:30:52 +09:00
Hajime Hoshi
d45a975e3d
graphics: Remove one unnecessary check from fragment shader ( #461 )
2017-12-16 01:42:36 +09:00
Hajime Hoshi
d6878d6887
graphics: Remove one bound check from fragment shader ( #461 )
2017-12-16 01:33:35 +09:00
Hajime Hoshi
98532d8983
graphics: Add TestImageOutside
2017-12-14 00:25:35 +09:00
Hajime Hoshi
704d4cf464
graphics: texel should be represented as highp for precision
...
Fixes #460
2017-12-13 23:45:05 +09:00
Hajime Hoshi
aea2e491c3
graphics: Temporary hack for mobile browers
...
roundTexel doesn't work well on moible browsers
2017-12-12 03:27:56 +09:00
Hajime Hoshi
723d153800
Reland(2): graphics: Appropriate rendering of edges on linear filter
2017-12-12 00:03:01 +09:00
Hajime Hoshi
362d1c417f
Revert 'graphics: Appropriate rendering of edges on linear filter (Reland)' ( #458 )
2017-12-11 20:30:54 +09:00
Hajime Hoshi
7b74a8f29f
graphics: Improve roundTexel implementation
2017-12-07 03:24:46 +09:00
Hajime Hoshi
1152439e65
graphics: Appropriate rendering of edges on linear filter (Reland)
...
Fixes #456
2017-12-07 02:26:16 +09:00
Hajime Hoshi
8091aa5190
Revert 'graphics: Appropriate rendering of edges on linear filter' #456
2017-12-06 23:40:29 +09:00
Hajime Hoshi
bc0432f310
graphics: Appropriate rendering of edges on linear filter
...
Fixes #315
2017-12-06 21:40:24 +09:00
Hajime Hoshi
264ca49a43
graphics: Bug fix: revert viewport size for Edge
2017-12-05 03:13:40 +09:00
Hajime Hoshi
f74c1e67ea
graphics: Use power-of-2 size for the default framebuffer
2017-12-05 02:33:04 +09:00
Hajime Hoshi
eeea25f202
opengl: Remove 'normalize' argument from VertexAttribPointer
2017-12-03 19:21:59 +09:00
Hajime Hoshi
2e1e4adb84
graphics: Fix some variables in GLSL
2017-12-03 19:07:12 +09:00
Hajime Hoshi
71ca838193
opengl: Refactoring
2017-12-03 03:55:59 +09:00
Hajime Hoshi
847ba9de0c
graphics: Refactoring: Move adjustment logic for glClearColor to opengl package
2017-12-03 03:51:42 +09:00
Hajime Hoshi
8e7e960b56
graphics: Limit source-rectangle range
...
Remove texture adjustment introduced due to #317
2017-12-02 23:13:44 +09:00
Hajime Hoshi
c2fab6cca3
graphics: Bug fix: glClear doesn't treat 0 or 1 correctly
...
Fixes #452
2017-12-02 22:25:02 +09:00
Hajime Hoshi
4a5420d6f2
opengl: Remove Node.js support ( #141 )
2017-12-02 16:46:55 +09:00
Hajime Hoshi
0379e3c591
audio: Deprecate Update
2017-12-01 00:26:28 +09:00
Hajime Hoshi
362f002d36
ui: Delete local variables asap on Android
2017-11-13 01:30:08 +09:00
Hajime Hoshi
cea9bd5a19
input: Bug fix: runeBuffer should be reset on each frame
2017-11-10 01:21:15 +09:00
Hajime Hoshi
4b83a060fe
ui: Add more keys not for charCode
2017-11-10 00:46:37 +09:00
Hajime Hoshi
fb8bef99c3
ui: Bug fix: key event on Edge browser
2017-11-10 00:39:46 +09:00
Hajime Hoshi
37ca48dc38
ui: Rename functions from Safari to Edge
2017-11-10 00:35:46 +09:00
Hajime Hoshi
0c0cd7e9d6
ui: Bug fix: call preventDefault for arrow keys
...
Fixes #450
2017-11-10 00:32:47 +09:00
Hajime Hoshi
ededc5874b
ui: Bug fix: Scale was wrong when magnifier is enabled
...
Fixes #244
2017-11-09 02:06:35 +09:00
Hajime Hoshi
7bcc9ee79f
ui: Add GamepadIDs and remove IsGamepadPresent ( #447 )
2017-10-26 23:59:09 +09:00
Hajime Hoshi
600baf2cc7
ui: Add IsGamepadPresent
...
Fixes #447
2017-10-26 02:59:33 +09:00
Hajime Hoshi
05e220e105
ui: Allow smaller window width ( #444 )
2017-10-20 03:25:21 +09:00
Hajime Hoshi
414170b138
ui: Refactoring
2017-10-20 02:50:39 +09:00
Hajime Hoshi
6ae67fc6dd
graphics: Add ColorM.Apply ( #432 )
2017-10-14 23:58:09 +09:00
Hajime Hoshi
9399622127
graphics: Bug fix: Don't adjust texels on iOS Safari
2017-10-03 02:34:16 +09:00
Hajime Hoshi
a7fc463d91
doc: Improve comments
2017-10-01 03:15:50 +09:00
Hajime Hoshi
d455b9b8bb
opengl: SetViewport no longer returns error
2017-09-25 00:17:20 +09:00
Hajime Hoshi
b590005c7a
opengl: BindFramebuffer no longer returns error
2017-09-25 00:14:25 +09:00
Hajime Hoshi
ade56f8176
opengl: BindTexture no longer returns error
2017-09-25 00:11:19 +09:00
Hajime Hoshi
37d8bd312a
graphics: Refactoring
2017-09-25 00:06:45 +09:00
Hajime Hoshi
8fbe423125
graphics: Delete programs explicitly and add comments
2017-09-24 23:41:37 +09:00
Hajime Hoshi
e5ca84013c
graphics: Bug fix: Delete buffer when necessary
2017-09-24 23:20:26 +09:00
Hajime Hoshi
ecc9d0b3b1
graphics: Add comments
2017-09-24 22:56:50 +09:00
Hajime Hoshi
2884e92041
jni: Add more comment
2017-09-24 04:52:32 +09:00
Hajime Hoshi
ed09dddf09
jni: Add comment
2017-09-24 02:54:35 +09:00
Hajime Hoshi
835d199f02
ui: Rename SetIcon to SetWindowIcon ( #386 )
2017-09-23 17:40:09 +09:00
Hajime Hoshi
dacda0d176
ui: Add SetIcon ( #386 )
2017-09-23 04:28:57 +09:00
Hajime Hoshi
ceceed951f
graphics: Add comments
2017-09-22 02:49:37 +09:00
Hajime Hoshi
6145ecee74
graphics: Misspelling
2017-09-21 23:33:27 +09:00
Hajime Hoshi
b47e564762
graphics: Add comments
2017-09-20 01:35:56 +09:00
Hajime Hoshi
0831fd2a0d
graphics: Add comments
2017-09-19 01:37:24 +09:00
Hajime Hoshi
2a9873a4bb
affine: Add GeoM.Apply ( #432 )
2017-09-16 17:19:45 +09:00
Hajime Hoshi
fc125eb531
graphics: Add comments
2017-09-16 15:49:29 +09:00
Hajime Hoshi
803aa77c20
affine: Refactoring
2017-09-16 15:49:12 +09:00
Hajime Hoshi
05d91eac09
restorable: Fix misspelling
2017-09-15 03:13:36 +09:00
Hajime Hoshi
f16b5d9c10
restorable: Rename variables
2017-09-15 01:14:09 +09:00
Hajime Hoshi
ccddf3c4ac
restorable: Refactoring: Remove arguments from NewImageFromImage
2017-09-15 00:51:17 +09:00
Hajime Hoshi
ca4a2d8209
restorable: Bug fix: Fix tests
2017-09-15 00:49:07 +09:00
Hajime Hoshi
2881d3fc4c
restorable: Add comments
2017-09-15 00:39:49 +09:00
Hajime Hoshi
80940f9070
restorable: Add comments
2017-09-15 00:24:18 +09:00
Hajime Hoshi
b51d93a707
restorable: Add comments
2017-09-12 03:14:13 +09:00
Hajime Hoshi
72c02fc398
graphics: Bug fix: viewport size must be within the framebuffer size
...
This fixes #71 and #420
2017-09-09 19:33:51 +09:00
Hajime Hoshi
0dcba7844b
ui: Bug fix: SetScreenSize didn't work on browsers
...
This fixes #427
2017-09-07 11:58:04 +09:00
Hajime Hoshi
d30f8a2bbf
graphics: Fix viewport sizes for Edge ( #71 )
2017-09-07 03:08:22 +09:00
Hajime Hoshi
da48712cf3
web: Add IsEdgeBrowser
2017-09-07 02:47:27 +09:00
Hajime Hoshi
2d5b062c3c
opengl: Refactoring: Replace NewBuffer with new funcs
...
Replace NewBuffer with NewArrayBuffer and NewElementArrayBuffer
2017-09-01 01:30:09 +09:00
1l0
5d2393c3c1
glfw: Add StickyModes to window.InputMode ( resolve #314 #399 ) ( #423 )
2017-08-28 23:29:19 +09:00
Hajime Hoshi
99d170b454
ui: Remove isSafari that is not used anywhere
2017-08-27 02:14:23 +09:00
Hajime Hoshi
b05455a2a6
clock: Fix comments
2017-08-24 02:30:43 +09:00
Hajime Hoshi
12c24215b1
graphics: Bug fix: Flush after filling ( #419 )
2017-08-24 00:11:08 +09:00
Hajime Hoshi
bb6dfeefd4
ui: Add comments on Touches
2017-08-22 00:58:38 +09:00
Jake
0d703ca3d4
InputChars ( #403 )
...
This implements #400
2017-08-15 04:11:51 +09:00
Hajime Hoshi
5f538bff82
ui: Bug fix: initCursorVisible must be true by default
2017-08-12 18:32:51 +09:00
Hajime Hoshi
783e57d3f2
ui: Remove 'fullscreen' member variable
2017-08-12 18:31:16 +09:00
Hajime Hoshi
b186bc1e94
ui: Add IsCursorVisible ( #377 )
2017-08-12 15:45:16 +09:00
Hajime Hoshi
9ab517cf82
restorable: Refactoring
2017-08-07 00:06:35 +09:00
Hajime Hoshi
1fb7e123c2
Remove dependencies on internal/graphics from ebiten
2017-08-06 21:34:24 +09:00
Hajime Hoshi
c0ecb7a386
graphics: Move CopyImage to restorable
2017-08-06 21:21:38 +09:00
Hajime Hoshi
631264fce1
Add 'internal/math' package
2017-08-06 20:05:14 +09:00
Hajime Hoshi
14737df60f
loop: Remove package loop
2017-08-06 02:17:26 +09:00
Hajime Hoshi
0913adc1e2
loop: Remove Update
2017-08-06 02:15:27 +09:00
Hajime Hoshi
d1cbfdeec7
clock: Move now() from loop to clock
2017-08-06 02:12:23 +09:00
Hajime Hoshi
f0f115b612
clock: Move FPS calculation from loop to clock
2017-08-06 02:09:33 +09:00
Hajime Hoshi
b1d12f08f8
loop: Remove unneeded member variables
2017-08-06 01:49:20 +09:00
Hajime Hoshi
95a061df7f
loop: Remove dependency from audio to loop
2017-08-06 01:43:09 +09:00
Hajime Hoshi
2e7a477f9d
clock: Refactoring
2017-08-06 01:28:14 +09:00
Hajime Hoshi
e98475cf9d
clock: Reduce a variable
2017-08-06 00:29:06 +09:00
Hajime Hoshi
1ea6bb2b6a
clock: Fix comments
2017-08-06 00:27:45 +09:00
Hajime Hoshi
b7d559fdf3
clock: Refactoring: Move frames calculation to clock
2017-08-06 00:18:38 +09:00
Hajime Hoshi
288a7ede8d
loop: Bug fix: Revert audio-clock syncing
2017-08-05 23:49:11 +09:00
Hajime Hoshi
d99638d34c
loop: Bug fix: wrong updating |lastUpdated|
2017-08-05 23:31:10 +09:00
Hajime Hoshi
6f606c6bb1
loop: Bug fix: Don't use 'system timer clock' when audio clock is valid
2017-08-05 23:26:43 +09:00
Hajime Hoshi
a92f77c207
clock: Rename function names; loop: Rename variables
2017-08-05 22:25:21 +09:00
Hajime Hoshi
94843fbe73
loop: Move clock.FPS to loop.FPS to reduce dependencies
2017-08-05 22:08:58 +09:00
Hajime Hoshi
19760be346
loop: Refactoring
2017-08-05 22:07:03 +09:00
Hajime Hoshi
b85f5edee0
loop: Simplify logic
2017-08-05 21:24:04 +09:00
Hajime Hoshi
eef8289854
loop: Remove dependency on ui
2017-08-05 20:43:49 +09:00
Hajime Hoshi
56a17a7f79
loop: Reduce defer for performance and readability
2017-08-05 20:19:17 +09:00
Hajime Hoshi
9f98ccc611
loop: Rename UpdateAndDraw -> Update
2017-08-05 20:14:49 +09:00
Hajime Hoshi
f0d47312c4
ui: Add IsRunnableInBackground / SetRunnableInBackground ( #272 )
2017-08-03 03:21:51 +09:00
Hajime Hoshi
bb5036b3e1
ui: Refactoring
2017-08-03 01:07:04 +09:00
Hajime Hoshi
1021521591
ui: initFullscreen should always be protected by lock
2017-08-03 00:19:04 +09:00
Hajime Hoshi
434d5bb00b
ui: Bug fix: SetFullscreen / IsFullscreen should be concurrent safe; IsFullscreen should return the correct value even before Run
2017-08-02 23:48:08 +09:00
Hajime Hoshi
807d03eb3b
ui: Delay initialize until Run ( #397 )
2017-07-30 20:26:40 +09:00
Hajime Hoshi
ee98148b54
graphics: Use default precisions in the fragment shader
2017-07-29 04:08:03 +09:00
Hajime Hoshi
84a7787ac9
graphics: No need to specify precision on vertex shaders (highp is default)
2017-07-29 02:57:56 +09:00
Hajime Hoshi
d46d9ac7c2
opengl: Remove GlslHighpSupported
2017-07-24 22:59:25 +09:00
Hajime Hoshi
85d39699d3
graphics: Bug fix: Need to specify default precisions ( #390 )
2017-07-24 21:56:40 +09:00
Hajime Hoshi
3bfb5054af
Fix misspelling
2017-07-23 22:50:18 +09:00
Hajime Hoshi
5ae03494f2
ui: Resize canvas size when the window is resized ( #387 )
2017-07-22 02:04:15 +09:00
Hajime Hoshi
63e3bc73d6
ui: Implement fullscreen for browsers ( #387 )
2017-07-22 01:52:08 +09:00
Hajime Hoshi
717efd097d
loop: Bug fix: the clock needs to be stopped when the window is unfocused
2017-07-16 23:54:14 +09:00
Hajime Hoshi
f591ca3d2b
ui: Bug fix: SetFullscreen didn't work without Run
2017-07-15 21:43:33 +09:00
Hajime Hoshi
c94c994bd1
ui: Allow SetFullscreen without Run
2017-07-15 20:29:13 +09:00
Hajime Hoshi
59110ba5ec
clock: Refactoring: Use clock.FPS everywhere
2017-07-14 03:19:50 +09:00
Hajime Hoshi
3d8fc790b6
loop: Remove dependency on audio
2017-07-14 01:42:58 +09:00
Hajime Hoshi
5d1d0844e1
Add internal/clock
2017-07-14 00:34:05 +09:00
Hajime Hoshi
fe3f0b2f1f
loop: Better syncing with audio
2017-07-14 00:03:59 +09:00
Hajime Hoshi
0de9828e20
loop: Fix FPS calculation
2017-07-13 23:48:06 +09:00
Hajime Hoshi
c3202b8e58
audio: Adjust the buffer size
2017-07-13 23:48:03 +09:00
Hajime Hoshi
15f5d2a2cc
loop: More stable FPS
2017-07-13 01:34:02 +09:00
Hajime Hoshi
40ae782a67
loop: Early exit when no frame needs to be updated
2017-07-13 01:34:02 +09:00
Hajime Hoshi
fdaf03b209
audio: Make the game loop depend on the audio clock
2017-07-13 01:33:59 +09:00
Hajime Hoshi
26a83c0e00
opengl: Define Texture/Framebuffer Equals for JS performance
2017-07-02 22:18:49 +09:00
Hajime Hoshi
3a3a4af035
graphics: Avoid type assertions for Fill
2017-07-02 21:32:07 +09:00
Hajime Hoshi
364819f361
restorable: Disable restoring on desktops and mobile browsers ( #380 )
2017-07-02 15:58:00 +09:00
Hajime Hoshi
e582a661c9
ui: Bug fix: Should add <meta> to <head> instead of <body>
2017-07-02 04:18:43 +09:00
Hajime Hoshi
d6466fdcaf
ui: Bug fix: initial scale must be 1 for proper scaling
2017-07-02 04:08:25 +09:00
Hajime Hoshi
565a28ff04
restorable: Merge draw image history items if possible ( #379 )
2017-07-02 02:21:23 +09:00
Hajime Hoshi
979836d0f5
restorable: Refactoring: move and rename a const
2017-07-02 01:41:07 +09:00
Hajime Hoshi
d7b7aac6e4
ui: Fix wrong comment
2017-07-01 13:03:27 +09:00
Hajime Hoshi
7d236950c2
ui: Bug fix: SwapInterval needs to be called after SetMonitor ( #357 )
2017-07-01 12:41:16 +09:00
Hajime Hoshi
ba204c6d3b
ui: Adjust cursor positoin on fullscreen mode ( #374 )
2017-07-01 04:27:38 +09:00
Hajime Hoshi
c694851765
ui: Center the screen on fullscreen mode ( #374 )
2017-07-01 04:12:09 +09:00
Hajime Hoshi
3168af1db4
ui: Refactoring: refresh rate is ignored when no monitor is specified at SetMonitor
2017-06-30 23:20:53 +09:00
Hajime Hoshi
68fbf59720
ui: Refactoring
2017-06-30 11:07:19 +09:00
Hajime Hoshi
cefa86ce13
ui: Fullscreen scale can be recalculated during fullscreen mode
2017-06-30 10:54:13 +09:00
Hajime Hoshi
6336b59493
ui: Bug fix: original positions must not be updated during fullscreen mode ( #376 )
2017-06-30 10:48:18 +09:00
Hajime Hoshi
af8b5d72c3
ui: Bug fix: Fullscreen scale must be recalculated
2017-06-30 10:22:30 +09:00
Hajime Hoshi
76da09f74c
ui: Bug fix: Window title might lost on macOS ( #267 )
2017-06-30 02:14:14 +09:00
Hajime Hoshi
64ed7b93f6
ui: Bug fix: better restoring position ( #267 )
2017-06-30 02:11:54 +09:00
Hajime Hoshi
1d60c009ed
ui: Bug fix: fullscreen scale calculation was wrong ( #267 )
2017-06-30 02:08:12 +09:00
Hajime Hoshi
2996f778b6
ui: Bug fix: position was wrong when changing window size
2017-06-30 01:53:14 +09:00
Hajime Hoshi
5b6fa2d384
ui: Adjust cursor position on fullscreen ( #267 )
2017-06-30 01:39:26 +09:00
Hajime Hoshi
e7370d8a54
ui: Adjust fullscreen scale ( #267 )
2017-06-30 01:28:35 +09:00
Hajime Hoshi
5dbfafb200
ui: Reserve window position before entering fullscreen-mode ( #267 )
2017-06-30 01:28:03 +09:00
Hajime Hoshi
b569eb9c5a
ui: Add SetFullscreen / IsFullscreen ( #267 )
2017-06-30 01:28:00 +09:00
Hajime Hoshi
d0f086323b
ui: Use returning values
2017-06-30 00:37:24 +09:00
Hajime Hoshi
f7a8c7efa6
ui: Avoid recalc the scale factor
2017-06-05 00:06:40 +09:00