Hajime Hoshi
06f4142ca0
internal/driver: Optimization: Replace interface{} with driver.Uniform
...
Converting a value from/to interface{} can create a value in heap
and this is not efficient.
2021-10-30 02:58:28 +09:00
Hajime Hoshi
96dc80fd08
internal/restorable: Remove needsDisposingWhenRestoring
...
Now restoring from context lost doesn't work on browsers. Then,
the constant needsDisposingWhenRestoring is actually always true.
2021-10-23 23:46:29 +09:00
Hajime Hoshi
dddfe73604
internal/uidriver/mobile: Bug fix: iOS with ebitengl build tag didn't work correctly
2021-10-23 23:32:57 +09:00
r3vit
57c45a13e4
Remove dot imports from tests - Remove dot imports ( #1837 )
...
Closes #1824
2021-10-02 19:58:48 +09:00
Hajime Hoshi
dbe101a8ef
internal/restorable: Remove draw-triangles-history items explicitly
...
Updates #1803
2021-09-09 12:57:50 +09:00
Hajime Hoshi
8f857daf3e
internal/restorable: Bug fix: Forbid NewImage before the graphics driver is ready
2021-09-09 03:58:58 +09:00
Hajime Hoshi
a3570331dd
internal/restorable: Delay initializing emptyImage
...
Now NeedsRestorable can always return a correct value.
2021-09-09 03:27:22 +09:00
Hajime Hoshi
60b8f82bfd
graphicscommand: Dump internal image info on the debug mode
...
Closes #1714
2021-08-05 01:16:42 +09:00
Hajime Hoshi
18903db1c6
internal/atlas: Bug fix: Unexpected padding in screenshots
...
Closes #1736
2021-07-29 16:09:29 +09:00
Hajime Hoshi
21aa96f9f5
internal/affine: Refactoring: Make ColorM interface
2021-07-27 12:10:22 +09:00
Hajime Hoshi
6213c17abc
internal/driver: Add Graphics.Initialize
2021-07-07 13:58:42 +09:00
Hajime Hoshi
b466a0cbd7
ebiten: Add EvenOdd to DrawTrianglesOptions and DrawShaderTrianglesOptions
...
Updates #844
Closes #1684
2021-07-05 03:35:55 +09:00
Hajime Hoshi
c725937cc6
internal/graphics: Reuse the vertices backend
...
This is basically a reland of 9cb631e30f
.
This change locks the vertices backend at the end-frame phase to
protect from vertices usages by other goroutines.
Updates #1546
Closes #1681
2021-06-27 02:31:01 +09:00
Hajime Hoshi
38ce46328a
internal/atlas: Reuse byte array for ReplacePixels
...
This reduces memory allocation at ReplacePixels.
Updates #1681
2021-06-26 03:48:25 +09:00
Hajime Hoshi
b54ad73a2b
Add go:build comments with go1.17beta1 fmt
2021-06-11 01:11:46 +09:00
Hajime Hoshi
26b9fa20c1
internal/graphics: Bug fix: Race condition at QuadVertices
...
QuadVertices or verticesBackend.slice reused its backend slice.
This caused a race condition. QuadVertices can be accessed from
multiple goroutines, and resetting the head and copying the data
at internal/graphicscommand might not be synced.
This change fixes this issue by basically reverting
9cb631e30f
.
Closes #1546
2021-03-20 16:32:13 +09:00
Hajime Hoshi
6b3c51921c
internal/driver: Remove Image.Sync
...
Syncing is no longer needed for Metal, and additionally, OpenGL's sync
implementation was mock.
Updates #1508
2021-02-26 23:16:28 +09:00
Hajime Hoshi
9341d21614
internal/shareable: Call DrawTriangles instead of ReplacePixels at makeShared ( #1513 )
...
When context losts never happen, reading pixels and call replace-pixels command are not needed.
Closes #1508
2021-02-26 12:56:22 +09:00
Hajime Hoshi
44bb004cb7
internal/restorable: Avoid allocating new slices for drawTrianglesHistory
2021-01-30 19:13:03 +09:00
Hajime Hoshi
de14a44c01
restorable: Replace a potentially dangerous pointer usage
...
Getting a poniter to a loop variable is potentially dangerous.
2020-12-20 13:28:17 +09:00
Hajime Hoshi
410766c984
restorable: Add more detailed information to the panic message
...
Updates #1427
2020-12-05 19:56:06 +09:00
Hajime Hoshi
ed494dbf59
restorable: Reland: Do not record pixels if restoring is not requried
...
This change also remove the restrictions of operations on
graphicscommand.Image. For example, now DrawTriangles and
ReplacePixels can be mixed on the same image.
Fixes #1022
2020-11-14 15:00:16 +09:00
Hajime Hoshi
c7330883ef
restorable: Remove Fill and make (*ebiten.Image).Fill available for sub-images
...
Now a scissor (a clipping region) can be specified, we don't have to
worry about the rendering results out of the specified region.
Replace the implmenetation of the Fill with just a DrawTriangles with
an empty white image.
As a side effect, SubImage is avilable for Fill.
Fixes #1416
2020-11-08 02:50:06 +09:00
Hajime Hoshi
ed028110cf
ebiten: Allow rendering on a sub-image by scissor test
...
Fixes #1255
2020-11-08 00:58:44 +09:00
Hajime Hoshi
a8f96ee9af
graphicsdriver/metal: Add Sync to sync CPU and GPU asynchronously
...
Fixes #1414
2020-11-07 04:09:47 +09:00
Hajime Hoshi
48b46345d7
restorable: Refactoring
2020-11-04 02:03:47 +09:00
Hajime Hoshi
831c7ca6f4
restorable: Refactoring: Use the smaller empty image
2020-10-31 03:06:44 +09:00
Hajime Hoshi
fa53160e18
mipmap: Stop using negative mipmaps
...
Negative mipmaps tend to allocate extremely big images.
Instead, encourage to use images with explicit padding when enlarging
the image.
Fixes #1400
2020-10-31 02:52:40 +09:00
Hajime Hoshi
b2d618c2be
mipmap, shareable: Refactoring: Remove SetGraphicsDriver
2020-10-13 01:36:52 +09:00
Hajime Hoshi
7a0e31a23a
Clean up the 'js' build tags
...
Updates #1129
2020-10-07 01:33:10 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Hajime Hoshi
f3ef2e2af5
Performance optimization for the path without a shader
...
Fixes #1355
2020-09-21 05:43:24 +09:00
Hajime Hoshi
7329880f40
restorable: Make the image stale when volatile state changes
2020-08-19 21:13:05 +09:00
Hajime Hoshi
8aef1f9080
restorable: Enable to set the 'volatile' state later
...
Updates #1309
2020-08-19 00:57:23 +09:00
Hajime Hoshi
64a6b39240
Revert "restorable: Do not record pixels if restoring is not requried"
...
This reverts commit 5e1f263d6d
.
Reason: Issue #1304
2020-08-17 00:00:12 +09:00
Hajime Hoshi
5e1f263d6d
restorable: Do not record pixels if restoring is not requried
...
Fixes #1022
2020-08-16 20:07:17 +09:00
Hajime Hoshi
71e65fa1b7
cmd/ebitenmobile: Use an explict way to detect context lost on Android
...
Fixes #1176
2020-08-15 01:39:08 +09:00
Hajime Hoshi
a45e241da1
shaderir/metal: Implement the shader IR compiler for Metal
...
Fixes #1165
2020-08-08 19:14:57 +09:00
Hajime Hoshi
5506491c03
graphicsdriver/opengl: Bug fix: Binding the same texture multiple times did not work
...
Updates #1193
2020-07-19 04:34:53 +09:00
Hajime Hoshi
36e9803cea
shader: Enable to get pixels from multiple images
...
Updates #1193
2020-07-19 02:33:43 +09:00
Hajime Hoshi
5dd073fcbb
restorable, graphicscommand: Remove uniform variables
2020-07-19 01:55:01 +09:00
Hajime Hoshi
e0d5763a60
shader: Use the fixed number of images for shaders
...
This changes uses arrays rather than slices in order to avoid heap
allocations.
Updates #1193
2020-07-18 18:27:47 +09:00
Hajime Hoshi
7f70797a6d
ebiten: Rename DrawTriaglesWithShaderOptions.Textures to Images
2020-07-15 03:49:05 +09:00
Hajime Hoshi
d217bc6033
ebiten: Sparate textures from uniforms at DrawTrianglesWithShader
...
Updates #1193
Updates #1239
2020-07-09 01:59:21 +09:00
Hajime Hoshi
b83f0acc4d
Remove source-region information from vertices
...
Fixes #1210
2020-07-02 23:38:39 +09:00
Hajime Hoshi
71c9e7ac40
driver: Add Region and sourceRegion parameter at Draw
...
This is a preparation to remove source-region information from
vertices.
Updates #1210
2020-07-02 03:26:05 +09:00
Hajime Hoshi
4c640d2500
buffered, restorable: Remove copying pixels
...
Instead, the callers (ebiten.NewImageFromImage and
(*ebiten.Image).ReplacePixels) have responsibility to copy the
pixels now. This change should reduce unnecessary copying pixels.
Updates #1222
2020-07-01 02:56:40 +09:00
Hajime Hoshi
1fe2f47701
graphicscommand: Remove the source-region parts from the uniform variables
2020-06-30 00:44:05 +09:00
Hajime Hoshi
dea3785750
shareable, restorable, graphicscommand: Remove making arrays at DrawTriangles
...
Updates #1220
2020-06-29 13:37:37 +09:00
Hajime Hoshi
a1abe6b728
restorable: Add padding when renderingn the empty image
2020-06-26 14:01:49 +09:00