Hajime Hoshi
f54bdfa159
Reland: graphics: Bug fix: a sub image's Size was wrong
...
Size() usages are also fixed.
Fixes #732
2018-11-08 12:58:14 +09:00
Hajime Hoshi
27331024af
Revert "graphics: Bug fix: a sub image's Size was wrong"
...
This reverts commit 76ac850f6b
.
Reason: This breaks many examples
2018-11-08 12:19:38 +09:00
Hajime Hoshi
76ac850f6b
graphics: Bug fix: a sub image's Size was wrong
...
Fixes #732
2018-11-08 04:22:19 +09:00
seebs
74e204d952
graphics: Speed up DrawTriangles ( #723 )
...
DrawTriangles is expensive and slow because of massive memory
allocation and garbage collection costs. This patch moves from ~47TPS
on my laptop (with ~24k triangles) to 60TPS. The first part
is just allocating the right size of vertex buffer up front; that
got to about 55TPS. The second part replaces the frequent
allocations of []float32 in Vertex() calls with writing the
desired values into a provided destination slice.
Time spent in drawing triangles for 1,000 frames:
13.07s baseline
11.09s preallocate whole buffer to avoid resizing
6.13s use new PutVertex function
This might need some cleanup, but I think it's good evidence that
the design change is viable.
2018-10-31 10:53:17 +09:00
Hajime Hoshi
ec92f61a3e
graphics: Misspelling
2018-10-29 02:05:59 +09:00
Hajime Hoshi
27ee54b008
graphics: Forbid using a subimage at DrawTriangles ( #727 )
2018-10-29 01:37:59 +09:00
Hajime Hoshi
ce1c616f69
Merge graphics and graphicsutil
2018-10-28 23:03:06 +09:00
Hajime Hoshi
ff54d3b681
Move CompositeMode to graphics package
2018-10-28 21:49:47 +09:00
Hajime Hoshi
06f2052817
Add graphics package and move Filter to graphics
2018-10-28 20:25:52 +09:00
Hajime Hoshi
2da5192510
Rename graphics -> graphicscommand
2018-10-28 20:10:05 +09:00
Hajime Hoshi
3349a2c520
graphics: Add comments
2018-10-28 19:41:39 +09:00
Hajime Hoshi
781554ecb9
graphics: Refactoring
2018-10-28 19:35:01 +09:00
Hajime Hoshi
710f56531f
graphics: Experimental: (*image.Image).SubImage
...
Fixes #722
2018-10-28 02:19:14 +09:00
Hajime Hoshi
41877bba0b
graphics: Add image state check at DrawTriangles
2018-10-28 01:43:28 +09:00
Hajime Hoshi
170f0fcaa9
graphics: Refactoring
2018-10-28 01:39:58 +09:00
Hajime Hoshi
5f04f05cb1
graphics: Add comments
2018-10-26 03:29:20 +09:00
Hajime Hoshi
d3bd858aba
graphics: Bug fix: Mipmap was not invalidated at DrawTriangle
...
Fixes #725
2018-10-26 02:08:18 +09:00
Hajime Hoshi
8b82667df1
graphics: Bug fix: Violating edge pixels with linear filter
...
Fixes #724
2018-10-26 00:48:51 +09:00
Hajime Hoshi
58f4feda8d
graphics: Refactoring (preparing SubImage)
2018-10-25 12:48:24 +09:00
Hajime Hoshi
765af5a7af
gofmt -s -w
2018-10-25 12:47:27 +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
022c40aa17
graphics: Move creating mipmap logic to shareableImages
2018-10-25 01:35:34 +09:00
Hajime Hoshi
4cd3e3ae30
Update go.mod/go.sum
2018-10-24 01:16:17 +09:00
Hajime Hoshi
7494b19dea
graphics: Refactoring: Add shareableImages struct
2018-10-24 01:09:59 +09:00
Hajime Hoshi
5e09da1298
graphics: Bug fix: don't apply color matrix when creating mipmap images
...
TODO: Add tests.
Fixes #710
2018-10-11 02:34:07 +09:00
Yuval Langer
8ba787522f
Fix minor typo ( #706 )
2018-10-09 03:19:27 +09:00
Hajime Hoshi
8772d310fe
Revert "Revert "graphics: Fix documentation about DrawImage""
...
This reverts commit f16c7cb90d
.
Reason: Oops, I reverted a wrong commit
2018-08-14 12:27:18 +09:00
Hajime Hoshi
f16c7cb90d
Revert "graphics: Fix documentation about DrawImage"
...
This reverts commit 610bf6e39f
.
Reason: This caused a new black line at the bottom (macOS).
2018-08-14 12:26:28 +09:00
Hajime Hoshi
2360b2930f
graphics: Add DrawTriangles
...
Fixes #624
2018-08-14 01:23:14 +09:00
Hajime Hoshi
610bf6e39f
graphics: Fix documentation about DrawImage
2018-08-11 02:14:37 +09:00
Hajime Hoshi
690c3cf981
graphics: Embed 'scale' part of the color matrix
...
If the color matrix includes only 'scale' part, they are embedded
into vertices in order to reduce draw calls.
Fixes #662
2018-08-10 23:20:55 +09:00
Hajime Hoshi
3daaef2cab
restorable: Refactoring: Use ReplacePixels(nil, ...) for clearing an image
2018-08-09 01:16:46 +09:00
Hajime Hoshi
c68c36b0b7
restoreable: Add ClearState to clear the state explicitly
...
Fixes #566
2018-08-09 00:12:45 +09:00
Hajime Hoshi
77e905eb25
Revert "graphics: Embed color matrices values to vertices ( #655 )"
...
This reverts commit 5a9235aaf9
.
2018-08-06 01:44:31 +09:00
Hajime Hoshi
bf19f902af
Revert "graphics: Fix DrawImage comment"
...
This reverts commit 8e6314f856
.
2018-08-06 01:44:31 +09:00
Hajime Hoshi
bac0431c9f
graphics: Simplify mipmap calculation
2018-08-03 00:02:49 +09:00
Hajime Hoshi
5c201af311
graphics: Bug fix: compile error
2018-07-31 01:56:59 +09:00
Hajime Hoshi
0956ca0ea6
graphicsutil: Add MipmapLevel
2018-07-31 01:47:03 +09:00
Hajime Hoshi
b8ab1363d2
graphics: Bug fix: mipmap level calculation
2018-07-31 01:02:09 +09:00
Hajime Hoshi
d7d02e6d6a
Reland: graphics: mipmap images should be volatile when the base image is volatile
...
This is not a bug fix, but should improve performance.
2018-07-30 00:26:36 +09:00
Hajime Hoshi
20c8d7317c
graphics: Add comments
2018-07-30 00:02:03 +09:00
Hajime Hoshi
5be58086b5
Revert "graphics: Bug fix: mipmap images should be volatile when the base image is volatile"
...
This reverts commit 0f82330009
.
2018-07-29 23:58:46 +09:00
Hajime Hoshi
0f82330009
graphics: Bug fix: mipmap images should be volatile when the base image is volatile
2018-07-29 23:54:46 +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
8e6314f856
graphics: Fix DrawImage comment
2018-07-26 11:40:01 +09:00
Hajime Hoshi
5a9235aaf9
graphics: Embed color matrices values to vertices ( #655 )
...
Fixes #531
2018-07-26 11:37:27 +09:00
Hajime Hoshi
5249afc06b
graphicsutil: Add QuadIndices
2018-07-21 03:40:37 +09:00
Hajime Hoshi
2e7745044d
shareable: Fix Image.DrawImage to accept vertices and indices
2018-07-21 03:30:27 +09:00
Hajime Hoshi
6c8b7f8e9c
graphics: Refactoring: Reduce error propagations
2018-07-12 03:08:50 +09:00
Hajime Hoshi
840c4d24df
graphicsutil: Accept matrix parameters directly for performance
2018-06-19 00:19:32 +09:00
Hajime Hoshi
ac24a8382f
graphicsutil: Extract matrix applying for performance
2018-06-17 19:45:09 +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
b4ace53596
affine: Remove GeoM to avoid GeoM allocations on the heap
2018-06-17 00:59:50 +09:00
Hajime Hoshi
e53fa53f7d
graphics: Prefer ReplacePixels to DrawImage for small images
2018-05-03 11:52:04 +09:00
Hajime Hoshi
4d3d407205
graphics: Add comments to At
2018-05-01 18:07:52 +09:00
Hajime Hoshi
63c33b24df
graphics: Refactoring
2018-04-16 01:51:32 +09:00
Hajime Hoshi
008ed26276
graphics: Check isDisposed at (*Image).Clear and Fill
2018-04-08 01:39:06 +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
abdfb3b713
graphics: Initialize (*Image).addr asap not to rely on the fact that fill is called
2018-04-06 00:35:18 +09:00
Hajime Hoshi
af0d6d7a48
graphics: Remove GuaranteedMaxImageSize
2018-04-03 22:59:19 +09:00
Hajime Hoshi
a36ea971b4
examples/airship: Improve z values
2018-03-12 03:18:07 +09:00
Hajime Hoshi
a335b0c5a3
graphics: Fix comments about MaxImageSize
2018-03-12 02:01:30 +09:00
Hajime Hoshi
ee7ef75b8b
graphics: Add explanation to SourceRect
2018-03-11 21:33:55 +09:00
Hajime Hoshi
a2d6ae7eee
shareable: Rename ImagePart -> Image
2018-03-11 00:05:06 +09:00
Hajime Hoshi
df3960a97c
Add internal/shareable
2018-03-10 23:59:26 +09:00
Hajime Hoshi
1556db74fa
graphics: Rename sharedImage -> shareableImage
2018-03-10 23:39:06 +09:00
Hajime Hoshi
9d0ea5c241
graphics: Refactoring: Remove (*sharedImagePart).region() usages from *Image
2018-03-10 23:36:07 +09:00
Hajime Hoshi
26f4999ddd
graphics: Refactoring: Remove (*sharedImagePart).image()
2018-03-10 23:27:16 +09:00
Hajime Hoshi
afda41a5ed
graphics: Refactoring: Remove (*Image).restorable
2018-03-10 23:18:50 +09:00
Hajime Hoshi
df9c67d5db
graphcis: Refactoring: (*Image).Size()
2018-03-10 19:46:46 +09:00
Hajime Hoshi
75049c4048
graphcis: Refactoring
2018-03-10 19:40:18 +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
00d8e793d9
restorable: Remove MaxImageSize
2018-03-09 02:50:38 +09:00
Hajime Hoshi
bc8a96eda7
graphicsutil: Avoid duplicated copying
...
Fixes #521
2018-03-09 01:00:23 +09:00
Hajime Hoshi
24dcaf7f28
graphcis: Fix comments
2018-03-04 03:07:06 +09:00
Hajime Hoshi
d944d51c14
graphics: Now images from NewImage also shares a texture
2018-03-03 21:01:25 +09:00
Hajime Hoshi
4b4404bc7e
graphics: Ensure the image is not disposed when restorableImage() is called
2018-03-03 20:36:33 +09:00
Hajime Hoshi
caf4e9504f
graphics: ReplacePixels should work on shared textures
2018-03-03 20:35:44 +09:00
Hajime Hoshi
4ae9d5780c
graphics: Implement shared texture ( #514 )
2018-03-03 19:54:53 +09:00
Hajime Hoshi
d5bca2d499
graphics: Bug fix: (*Image).At must return color.RGBA type value
2018-03-03 18:51:52 +09:00
Hajime Hoshi
046a6cd014
graphics: Swap error checking
2018-03-02 23:59:04 +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
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
9db042ae9e
graphics: Refactoring: easier way to clear framebuffer
2018-02-28 22:46:57 +09:00
Hajime Hoshi
8c8e512059
affine: User nillable pattern for ColorM
2018-02-28 02:14:06 +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
9031a989ec
graphics: Add (*Image).isDisposed
2018-02-26 11:35:55 +09:00
Hajime Hoshi
ccfa8f7ef8
graphics: Refactoring: call (*Image).Size() funciton as much as possible
2018-02-26 02:46:30 +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
94c4cc35ab
graphics: Forbid copying Image objects
2018-02-25 21:55:46 +09:00
Hajime Hoshi
c7a733fb16
graphics: Refactoring: remove drawWithFittingScale
2018-02-25 03:12:33 +09:00
Hajime Hoshi
58f5c9c1d0
graphics: Refactoring: clearing framebuffer
2018-02-24 23:51:05 +09:00
Hajime Hoshi
a644e92298
restorable: Better calculation to clear restorable.Image
2018-02-24 21:16:30 +09:00
Hajime Hoshi
556b2ec31b
graphics: Implement Image.Fill with DrawImage
2018-02-24 05:28:50 +09:00
Hajime Hoshi
cf333775f2
Add examples/filter
2018-02-14 03:07:17 +09:00
Hajime Hoshi
6ef4bbde2d
graphics: Add FilterDefault; Make DrawImageOptions specify Filter ( #453 )
2018-02-14 02:59:44 +09:00
Hajime Hoshi
80596820cf
graphics: Replace []uint8 with []byte
2018-01-28 22:40:36 +09:00
Hajime Hoshi
94d54b7d2c
graphics: Add comments
2017-12-16 18:35:25 +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
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
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
626b772b25
doc: Improve comments
2017-10-01 17:24:30 +09:00
Hajime Hoshi
a7fc463d91
doc: Improve comments
2017-10-01 03:15:50 +09:00
Hajime Hoshi
1995219b55
graphics: Add performance tips on DrawImage
2017-09-24 01:14:16 +09:00
Hajime Hoshi
e8acd9b6a2
graphics: Fix document
2017-09-23 18:15:31 +09:00
Hajime Hoshi
fc125eb531
graphics: Add comments
2017-09-16 15:49:29 +09:00
Hajime Hoshi
ccddf3c4ac
restorable: Refactoring: Remove arguments from NewImageFromImage
2017-09-15 00:51:17 +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
d2d19d0764
doc: Fix comments
2017-07-23 05:46:32 +09:00
Hajime Hoshi
3a3a4af035
graphics: Avoid type assertions for Fill
2017-07-02 21:32:07 +09:00
Hajime Hoshi
c694851765
ui: Center the screen on fullscreen mode ( #374 )
2017-07-01 04:12:09 +09:00
Hajime Hoshi
1d60c009ed
ui: Bug fix: fullscreen scale calculation was wrong ( #267 )
2017-06-30 02:08:12 +09:00
Hajime Hoshi
b526aed817
graphics: VRAM -> GPU
2017-06-06 00:57:14 +09:00
Hajime Hoshi
1d59938295
ui: Refactoring: Remove unneeded error handlings
2017-05-31 10:47:52 +09:00
Hajime Hoshi
7d181e3182
opengl: Hide OpenGL context usages into internal/graphics package
2017-05-31 02:18:04 +09:00
Hajime Hoshi
5a4a82ab50
restorable: Add TODO comments ( #357 )
2017-05-30 03:31:29 +09:00
Hajime Hoshi
c6c8ff22d7
graphics: Panic first when drawing the same image
2017-05-30 00:56:01 +09:00
Hajime Hoshi
de7215f3fc
graphics: Add DrawImageOptions.SourceRect
2017-05-28 00:49:44 +09:00
Hajime Hoshi
1b1b996817
graphics: Avoid copying ColorM
2017-05-27 16:17:49 +09:00
Hajime Hoshi
8b48d010ed
restorable: Refactoring
2017-05-03 23:24:00 +09:00
Hajime Hoshi
aa5c278445
restorable: Unexport add
2017-05-03 23:15:18 +09:00
Hajime Hoshi
ed4cd67fb3
graphics: finalizers must be reset when disposing
2017-05-03 23:15:03 +09:00
Hajime Hoshi
9f5cf48d24
restorable: Move Images to resotrable package
2017-05-03 23:11:43 +09:00
Hajime Hoshi
d94e9c9d86
restorable: Bug fix: Make limit to the number of draw-image command history ( #349 )
2017-05-03 22:16:32 +09:00
Hajime Hoshi
e8b155fefe
graphics: Remove duplicated runtime.SetFinalizer
2017-05-03 03:15:50 +09:00
Hajime Hoshi
f30b274c1f
graphics: Bug fix: Keep a restorable.Image before disposing
2017-05-03 03:13:22 +09:00
Hajime Hoshi
e8e502cc26
graphics: Bug fix: disposing check must be done before any operations
2017-05-03 03:07:45 +09:00
Hajime Hoshi
6be25d3297
graphics: Remove imageImpl
2017-05-03 02:52:42 +09:00
Hajime Hoshi
16b0c9186e
graphics: Refactoring: Reduce imageImpl's functions
2017-05-03 02:45:33 +09:00
Hajime Hoshi
858824821f
doc: Remove 'concurrent-safe' comments from most of non-global functions
2017-04-18 01:33:03 +09:00
Hajime Hoshi
a7d844ce5e
graphics: Add doc about error to struct Image ( #331 )
2017-03-04 02:30:10 +09:00
Hajime Hoshi
a3e14c9ddb
graphics: Image.ReplacePixels/Dispose always returns nil ( #331 )
2017-03-04 02:23:39 +09:00
Hajime Hoshi
b567a07d5f
graphics: DrawImage always returns nil ( #331 )
2017-03-04 01:33:43 +09:00
Hajime Hoshi
6ca71c6931
graphics: Errors of NewImage* are always nil ( #331 )
2017-03-04 01:22:51 +09:00
Hajime Hoshi
2c5ee99769
Simplify internal API not to return errors
2017-03-04 01:00:18 +09:00
Hajime Hoshi
7ba18a5d0d
graphics: Image.Clear/Fill now always return nil ( #331 )
2017-03-04 00:53:49 +09:00
Hajime Hoshi
1c7ce07edf
Simplify internal API not to return errors
2017-03-04 00:44:41 +09:00
Hajime Hoshi
147798e14d
Simplify internal API not to return errors
2017-03-03 23:59:44 +09:00
Hajime Hoshi
2b1dc69497
graphics: Document bug fix: DrawImage
2017-02-27 23:53:21 +09:00
Hajime Hoshi
6e897d1479
graphcis: Bug fix: Can't dispose textures/framebuffers after the context is lost (fixing #305 )
2017-01-22 01:37:08 +09:00
Hajime Hoshi
07294a98b6
Move internal/graphics/opengl -> internal/opengl
2016-11-03 23:31:25 +09:00
Hajime Hoshi
2b2d6157c7
graphics: Skip resetPixelsIfDependingOn if possible
2016-10-28 02:54:09 +09:00
Hajime Hoshi
43e8349567
graphics: Remove imageImpl.width/height
2016-09-04 01:25:02 +09:00
Hajime Hoshi
02151e48ea
restorable: Remove Image()
2016-09-04 00:53:30 +09:00
Hajime Hoshi
fb3724a40e
graphics: Remove imageImpl.image member
2016-09-03 23:08:51 +09:00
Hajime Hoshi
8855df40e4
gprahics: Bug fix: Check if an image is disposed before resetting pixels (examples/windowsize crashes)
2016-07-28 01:17:57 +09:00
Hajime Hoshi
4ad5c65efe
graphics: Rename s/ensure/resolveStale/
2016-07-27 23:08:28 +09:00
Hajime Hoshi
5c56058d6e
pixels Rename s/history/dependency/
2016-07-27 01:28:16 +09:00
Hajime Hoshi
c5f3eaf925
graphics: Refactoring
2016-07-26 12:28:05 +09:00
Hajime Hoshi
0fc61ed568
pixels: Rename fuctions
2016-07-26 10:51:48 +09:00
Hajime Hoshi
c0eb01d69e
pixels: Rename s/flush/reset/
2016-07-25 09:10:51 +09:00
Hajime Hoshi
95dae4ad45
pixels: Remove 'inconsistent' property
2016-07-25 09:01:00 +09:00
Hajime Hoshi
3ea6033c3d
graphics: Don't ref *Image in pixels. Ref *graphics.Image instead
2016-07-24 06:22:33 +09:00
Hajime Hoshi
9bbd5e89c3
graphics: Bug fix: GL context is not available until graphics context is initialized
2016-07-24 06:02:04 +09:00
Hajime Hoshi
8d074ecc20
graphics: Add Pixel's 'inconsistent' state
2016-07-24 01:28:39 +09:00
Hajime Hoshi
75916490b7
graphics: Better name functions
2016-07-24 00:46:24 +09:00
Hajime Hoshi
2ba835373b
graphics: Refactoring: passing a GL context from the top level
2016-07-14 01:20:45 +09:00
Hajime Hoshi
1627176d59
graphics: Restoring by recording drawing-images history
2016-07-13 12:38:59 +09:00
Hajime Hoshi
ebe7f10af1
graphics: Make NewVolatileImage unexported
2016-07-12 01:58:10 +09:00
Hajime Hoshi
0c611d875b
graphics: Bug fix: glTexSubImage2D on Android now works ( #211 )
2016-07-10 05:59:21 +09:00
Hajime Hoshi
c7783b2ecf
graphics: Clear volatile images at the start of a frame
2016-07-06 01:30:49 +09:00
Hajime Hoshi
1fdfa5707a
graphics: Fix a comment
2016-07-05 11:43:47 +09:00
Hajime Hoshi
31d1af9740
graphics: Add NewVolatileImage ( #235 )
2016-07-05 03:40:40 +09:00
Hajime Hoshi
11e67d0eed
graphics: Refactoring
2016-07-05 03:15:32 +09:00
Hajime Hoshi
793aad2681
graphics: Rename restorePixels -> restore
2016-07-05 03:01:32 +09:00
Hajime Hoshi
7e296b1aae
graphics: Bug Fix: The screen image should be recreated
2016-07-05 02:57:41 +09:00
Hajime Hoshi
6cb1c929b5
graphics: Bug fix: Reset finalizer of *Image
2016-07-05 02:16:49 +09:00
Hajime Hoshi
760e1aa288
graphics: Add newImageImplFromImage; Rename theImages -> theImagesForRestoring
2016-07-05 01:34:40 +09:00
Hajime Hoshi
eac816ca47
graphics: Remove imageImpl.screen
2016-07-05 01:23:29 +09:00
Hajime Hoshi
085336d50f
graphics: Add newImageImpl
2016-07-05 00:24:06 +09:00
Hajime Hoshi
006f918b8e
graphics: Bug fix: Call theImages.add after initializing ( #242 )
2016-07-04 23:41:57 +09:00
Hajime Hoshi
d70bf66a59
graphics: Reduce imageM usages
2016-07-03 23:23:57 +09:00
Hajime Hoshi
86144a1cd6
opengl: Move members to variables
2016-07-03 18:23:19 +09:00
Hajime Hoshi
89fe69d564
graphics: Separate image.go into image.go and imageimpl.go
2016-07-03 14:42:28 +09:00
Hajime Hoshi
22655682fb
graphics: Smaller scope for the lock
2016-07-03 03:08:41 +09:00
Hajime Hoshi
5826a958e1
graphics: Add a comment
2016-07-03 02:47:12 +09:00
Hajime Hoshi
0519c69c13
graphics: Add Image.noSave
2016-07-03 01:08:47 +09:00
Hajime Hoshi
fb8b6e93e5
graphics: Add TestNewImageFromSubImage (not bug fix)
2016-07-02 23:24:43 +09:00
Hajime Hoshi
5e892b3887
graphics: Add a comment about bug #211
2016-07-01 18:27:01 +09:00
Hajime Hoshi
5eb77d2fb5
Remove 'default framebuffer' and add 'screen framebuffer' for iOS
2016-06-18 04:56:13 +09:00
Hajime Hoshi
3f18096e95
graphics: Refactoring: Remove unneeded function
2016-06-13 00:01:01 +09:00
Hajime Hoshi
a1fbf2cd2d
graphics: Remove 'Resume'
2016-06-12 23:54:36 +09:00
Hajime Hoshi
854fa6f32c
graphics: Bug fix: double disposing
2016-06-12 23:13:41 +09:00
Hajime Hoshi
2a0ca3c393
graphics: Set pixels at NewImageFromImage
2016-06-12 21:29:25 +09:00
Hajime Hoshi
ea440f5b17
graphics: Bug fix: Don't touch interface after locking
2016-06-12 21:19:54 +09:00
Hajime Hoshi
d99bfaf034
graphice: Dispose old images before restoring
2016-06-12 20:57:02 +09:00
Hajime Hoshi
bd60f6eb9b
graphics: Move locks before manipulating theImages
2016-06-12 17:48:08 +09:00
Hajime Hoshi
15e85398e2
graphics: Save pixels more aggressively
2016-06-12 17:12:37 +09:00
Hajime Hoshi
eca175e0f4
graphics: Add Image
2016-06-12 01:34:21 +09:00
Hajime Hoshi
32e773cf10
Refactoring
2016-06-12 00:47:44 +09:00
Hajime Hoshi
fabed66b4a
graphics: Remove delayedImageTasks
2016-06-12 00:32:35 +09:00
Hajime Hoshi
32c2cb3ead
graphics: Add commands to create textures/framebuffers
2016-06-12 00:23:26 +09:00
Hajime Hoshi
2a58c095b8
graphics: Add disposeCommand
2016-06-11 22:52:07 +09:00
Hajime Hoshi
b59206b777
graphics: Move command flushing to ebiten package
2016-06-11 21:50:13 +09:00
Hajime Hoshi
dfd4bc89ed
graphics: Revert FlushCommand execution
2016-06-11 20:21:14 +09:00
Hajime Hoshi
912d498cdf
graphics: Remove unused arguments
2016-06-11 05:48:09 +09:00
Hajime Hoshi
f897c3958e
graphics: Fix restoring logic
2016-06-11 01:25:03 +09:00
Hajime Hoshi
127cd4cab6
graphics: Remove 'evacuated' state
2016-06-11 01:13:38 +09:00
Hajime Hoshi
f71dcd3466
Remove 'Pause'
2016-06-11 00:57:10 +09:00
Hajime Hoshi
66e78922f8
graphics: Fix a comment
2016-06-07 23:50:01 +09:00
Hajime Hoshi
8d17d1876c
graphics: Revert transitionImageParts since this didn't affect the speed
2016-06-06 00:23:18 +09:00
Hajime Hoshi
33b50ed294
graphics: Reduce calls of glUniformMatrix4fv
2016-06-05 23:32:25 +09:00
Hajime Hoshi
1ccdfd9a35
graphics: Reduce a space line
2016-06-05 03:17:24 +09:00
Hajime Hoshi
4812f2e76e
graphics: Reduce calls of glUniformMatrix4fv
2016-06-05 00:35:58 +09:00
Hajime Hoshi
f6fd8f9c6d
graphics: Reduce calling glUseProgram
2016-05-29 22:40:51 +09:00
Hajime Hoshi
6d06b01cae
gomobile bind works
2016-05-22 04:25:15 +09:00
Hajime Hoshi
dbd6ed8139
graphics: Move theDelayedImageTasks.exec() to newImageWithZeroFramebuffer
2016-05-18 22:45:15 +09:00
Hajime Hoshi
a35064db7d
ui: Add ui.GLContext()
2016-05-18 11:10:03 +09:00
Hajime Hoshi
063ed564fd
Move the run loop to internal/loop
2016-05-18 10:59:37 +09:00
Hajime Hoshi
4d04413bf9
ui: Move the run loop to internal/ui
2016-05-18 10:46:23 +09:00
Hajime Hoshi
49a0fc839e
graphics: Fix a wrong comment
2016-05-17 01:38:31 +09:00
Hajime Hoshi
75b7a9134d
graphcis: Bug fix: Evacuating/Restoring pixels must be ignored on a disposed image
2016-05-17 01:30:40 +09:00
Hajime Hoshi
18c14f8897
graphics: Refactoring
2016-05-17 01:09:33 +09:00
Hajime Hoshi
7ab2efaa3f
graphics: Add imageImpl and change Image to be a wrapper (emulating weak refs)
2016-05-17 01:03:28 +09:00
Hajime Hoshi
23863d5a2f
graphics: Add Image.evacuatePixels and restorePixels and introduce images
2016-05-17 00:22:32 +09:00
Hajime Hoshi
fbd07b1865
graphics: Simplify the size of pixels
2016-05-16 12:27:28 +09:00
Hajime Hoshi
da0196911d
graphics: Refactoring: Now all Image objects are generated from New* funcs
2016-05-15 21:08:39 +09:00
Hajime Hoshi
9d25a5f785
graphics: Remove wrong comments
2016-05-14 05:34:55 +09:00
Hajime Hoshi
e0d1e35e81
graphics: Add comment
2016-05-13 23:40:23 +09:00
Hajime Hoshi
f1f3bcc257
graphics: Bug fix: Concurrent-safe check in (*Image).At
2016-05-12 11:36:09 +09:00
Hajime Hoshi
9d569e3e49
graphics: Bug fix: now ebiten.Image can be passed to NewImageFromImage ( #213 )
2016-05-12 11:23:52 +09:00
Hajime Hoshi
15d48703fc
graphics: Bug fix: NewImageFromImage with ebiten.Image froze ( #212 )
2016-05-12 02:00:22 +09:00
Hajime Hoshi
acca1c2480
graphics: Better function and variable names
2016-05-08 04:55:27 +09:00
Hajime Hoshi
7f09402bd9
graphics: Kinder panic messages
2016-05-08 04:43:43 +09:00
Hajime Hoshi
bbc2ad915a
graphics: Remove image commands and use functions instead
2016-05-08 04:39:37 +09:00
Hajime Hoshi
b8a062e813
graphics: Add image.disposed
2016-05-08 03:44:15 +09:00
Hajime Hoshi
61ed13e322
graphics: Lazy image processing (especailly for mobile platforms)
2016-05-08 03:23:11 +09:00
Hajime Hoshi
99baaf18b0
ebiten: Refactoring
2016-05-08 00:52:30 +09:00
Hajime Hoshi
2fee1fae22
graphics: Dispose now returns errors
2016-05-07 23:34:10 +09:00
Hajime Hoshi
5c73357ef8
graphics: Fix wrong comment
2016-04-08 21:47:44 +09:00
Hajime Hoshi
9e58128ea8
graphics: Add 'concurrent-safe' comments
2016-04-08 04:09:43 +09:00
Hajime Hoshi
92e56d53f1
graphics: Reduce the size of vertices array
2016-04-08 04:08:45 +09:00
Hajime Hoshi
b2c5cb164a
graphics: Calculate vertices ahead of locking
2016-04-08 03:18:52 +09:00
Hajime Hoshi
c3d8cf2366
graphics: Make Image functions concurrent safe ( #201 )
2016-04-07 03:49:11 +09:00
Hajime Hoshi
bcf406f058
image: NewImage/NewImageFromImage are now cocurrent-safe ( #201 )
2016-04-06 11:11:31 +09:00
Hajime Hoshi
f58a253631
graphics: Fix comments
2016-03-26 04:27:07 +09:00
Hajime Hoshi
b02df7b542
graphics: Bug fix #186 by clearing non-black-or-white color
2016-03-17 03:31:12 +09:00
Hajime Hoshi
c6fc5ab865
graphics: CompositionMode -> CompositeMode ( #170 )
2016-03-01 02:16:32 +09:00
Hajime Hoshi
8ae1e292ab
graphics: Introduce CompositionMode ( #151 )
2016-02-29 01:37:06 +09:00
Hajime Hoshi
495d7ca0d1
graphics: NextPowerOf2Int -> NextPowerOf2Int32
2016-02-27 02:35:05 +09:00
Hajime Hoshi
0429c9c3e6
graphics: image's texture may be nil and this must be considered when disposing
2016-02-21 01:41:48 +09:00
Hajime Hoshi
63f2c3cb9f
graphics: Refactoring: remove ExecOnUIThread
2016-02-20 04:39:43 +09:00
Hajime Hoshi
eb9379c3a6
image: Bug fix: isDisposed misimplementation
2016-02-07 03:20:52 +09:00
Hajime Hoshi
27f1a865aa
image: Use SetFinalizer for images ( #67 )
2016-02-07 02:24:35 +09:00
Hajime Hoshi
e8c2e5f3d6
image: Add image.Dipose and image.IsDisposed
2016-02-07 01:27:55 +09:00
Hajime Hoshi
1e738f6a10
image: Remove image.DrawLines ( #142 )
2016-02-06 17:52:05 +09:00
Hajime Hoshi
07d64da098
image: Remove image.DrawLine ( #142 )
2016-02-06 17:49:26 +09:00
Hajime Hoshi
5c8df39496
image: Remove image.DrawFilledRects ( #142 )
2016-02-06 17:47:02 +09:00
Hajime Hoshi
b5ed0e3d6d
image: Remove image.DrawRect ( #142 )
2016-02-06 17:46:05 +09:00
Hajime Hoshi
85279e8422
image: Remove image.DrawFilledRect ( #142 )
2016-02-06 17:45:08 +09:00
Hajime Hoshi
580effba8e
image: Remove image.DrawRects ( #142 )
2016-02-06 17:20:10 +09:00
Hajime Hoshi
bb8a94ad09
Rename files
2016-02-05 23:20:41 +09:00
Hajime Hoshi
633ee4096e
#132 Temporal hack to run with Go1.5
2015-07-22 23:28:15 +09:00
Hajime Hoshi
95316a1de5
image: Cache size
2015-02-18 04:01:11 +09:00
Hajime Hoshi
beecf31937
Resolve some TODOs
2015-02-10 10:44:58 +09:00
Hajime Hoshi
249add3979
Add SetScreenSize
2015-02-09 11:02:04 +09:00
Hajime Hoshi
23b3f1afce
Move some files of internal/ui to the root
2015-01-27 01:10:17 +09:00
Hajime Hoshi
ae450433db
Move some files of internal to internal/graphics
2015-01-27 00:08:24 +09:00
Hajime Hoshi
346bc53d53
Move internal/opengl -> internal/graphics/internal/opengl
2015-01-26 23:27:28 +09:00
Hajime Hoshi
b57c675996
Remove internal.RGBA
2015-01-24 14:53:40 +09:00
Hajime Hoshi
2ab7c2eb9b
image: Add test
2015-01-22 11:27:50 +09:00
Hajime Hoshi
afe4c76b50
image: Bug fix: pixels must be reset after any drawing (TODO: add test)
2015-01-22 04:27:27 +09:00
Hajime Hoshi
f88f48f0ae
Comment fix
2015-01-21 00:42:27 +09:00
Hajime Hoshi
d994f34d53
Add image.ReplacePixels; Add example/noise ( #89 )
2015-01-20 23:58:58 +09:00
Hajime Hoshi
0bd0a4dbc2
Rename image.FillRect -> DrawFilledRect (FillRect is confusing with Fill)
2015-01-18 04:19:38 +09:00
Hajime Hoshi
26358f3e63
Revert lines' vetices (float64 -> int)
2015-01-17 23:33:57 +09:00
Hajime Hoshi
f0d40b4e1f
Revert rectangles' vetices (float64 -> int)
2015-01-17 23:31:09 +09:00
Hajime Hoshi
1659e9abab
Bug fix: Line's vertices should be moved by 0.5
2015-01-17 23:04:19 +09:00
Hajime Hoshi
683ffafe8d
Bug fix: image.Pixels didn't work on WebGL
2015-01-17 19:06:58 +09:00
Hajime Hoshi
7835f5cb2e
Add image.DrawRect / DrawRects (leaving some bugs)
2015-01-17 15:46:56 +09:00
Hajime Hoshi
5ff2b8697f
Bug fix: comment
2015-01-17 15:01:04 +09:00
Hajime Hoshi
8c15b57d58
Add image.DrawLine / DrawLines
2015-01-17 14:17:42 +09:00
Hajime Hoshi
22e6996f74
Remove rectVertexQuads
2015-01-17 03:51:21 +09:00
Hajime Hoshi
887e2fc675
Add image.DrawRect; Change Rects.Points -> Rects.Rect
2015-01-17 03:46:00 +09:00
Hajime Hoshi
8564ba8541
Use (un)signed short vertices ( #90 )
2015-01-16 10:37:26 +09:00
Hajime Hoshi
155be5a88d
Add Rect.Color
2015-01-16 01:57:10 +09:00
Hajime Hoshi
25cf2dab22
sprites: Speed up: use float64 as often as possible
2015-01-14 23:58:34 +09:00
Hajime Hoshi
0328b049d0
Add image.DrawRects (experimental)
2015-01-13 10:36:19 +09:00
Hajime Hoshi
01dbc515b5
Remove innerImage
2015-01-12 19:54:25 +09:00
Hajime Hoshi
21455a146d
Refactoring: Add imageparts.go
2015-01-12 18:41:06 +09:00
Hajime Hoshi
0332b8d5ed
Bug fix: image comment
2015-01-11 04:20:28 +09:00
Hajime Hoshi
4eaba93c73
Bug fix: image can't draw itself ( #45 )
2015-01-06 23:50:02 +09:00
Hajime Hoshi
b69c526613
Update comment
2015-01-05 23:55:40 +09:00
Hajime Hoshi
2be0aa7f0c
Fix comment
2015-01-05 10:08:54 +09:00
Hajime Hoshi
f697501531
Use ImageParts
2015-01-05 10:08:00 +09:00
Hajime Hoshi
cdc29210db
Introduce ImageParts
2015-01-05 09:32:27 +09:00
Hajime Hoshi
2f02a0a223
Avoid copying
2015-01-03 17:07:01 +09:00
Hajime Hoshi
13a94d3446
Avoid type switch
2015-01-03 15:52:02 +09:00
Hajime Hoshi
1117862d19
Avoid copying for performance
2015-01-03 14:23:31 +09:00
Hajime Hoshi
449bc7931d
Change receiver ColorM.Element and GeoM.Element to pointers (performance issue)
2015-01-03 01:54:12 +09:00
Hajime Hoshi
3d01084a2a
Hide structs in internal/ui
2015-01-02 03:25:31 +09:00
Hajime Hoshi
96f5315c49
Add internal/ui module
2015-01-02 02:13:27 +09:00
Hajime Hoshi
5f4aa33edf
Reduce currentUI usages
2015-01-01 04:30:10 +09:00
Hajime Hoshi
e10bcb3dd8
Move some methods to opengl.Context
2014-12-31 19:27:41 +09:00
Hajime Hoshi
dc6a153c65
Add opengl.Context.NewShader
2014-12-31 16:12:13 +09:00
Hajime Hoshi
fbcd04cda8
Add opengl.Framebuffer.SetAsViewport
2014-12-31 15:22:15 +09:00
Hajime Hoshi
450a8da267
Rename internal/opengl -> internal/graphics
2014-12-31 02:55:17 +09:00
Hajime Hoshi
957b4d392f
Refactoring: Hide some functions of opengl
2014-12-31 02:06:08 +09:00
Hajime Hoshi
22035e79fe
Reduce panics ( #16 )
2014-12-29 00:21:40 +09:00
Hajime Hoshi
ccd8fcac3d
Fix comments
2014-12-27 23:29:56 +09:00
Hajime Hoshi
325e05259a
Introduce ImagePart again
2014-12-27 17:37:31 +09:00
Hajime Hoshi
7849a68cd0
Remove DrawImageAt
2014-12-26 23:01:47 +09:00
Hajime Hoshi
ffab448d40
Rename ColorGeometry -> ColorM, GeometryMatrix -> GeoM ( #27 )
2014-12-26 22:50:25 +09:00
Hajime Hoshi
8ae96875c9
Bug fix: matrices' elements should be copied when assigning
2014-12-26 11:43:31 +09:00
Hajime Hoshi
ec6dc4b7ec
Use value-type values for some of DrawImageOption's members
2014-12-26 11:29:44 +09:00
Hajime Hoshi
d53d55a629
Rename *MatrixI -> New*Matrix
2014-12-26 03:58:33 +09:00
Hajime Hoshi
f7b2157585
Fix a comment
2014-12-26 03:47:27 +09:00
Hajime Hoshi
843b0d8621
Remove the struct DrawImageAt; Add a method (*Image).DrawImageAt
2014-12-26 03:46:25 +09:00
Hajime Hoshi
b69dec3f1e
Bug fix: comment
2014-12-26 03:24:57 +09:00
Hajime Hoshi
cdc84567ca
Rename At -> DrawImageAt
2014-12-26 03:00:40 +09:00
Hajime Hoshi
f2fbd991d2
Rename ImageDrawOptions -> DrawImageOptions ( #43 )
2014-12-26 01:39:48 +09:00
Hajime Hoshi
90665944b9
Rename ImageDrawOption -> ImageDrawOptions
2014-12-24 23:38:04 +09:00
Hajime Hoshi
494d07387d
Remove DrawImage.+ function ( #41 )
2014-12-24 23:17:58 +09:00
Hajime Hoshi
b39df50979
Introduce ImageDrawOption
2014-12-24 22:46:00 +09:00
Hajime Hoshi
373371d1b2
Change license comments style to use magic comments (magic comments like +build should be placed before a general comment)
2014-12-24 11:04:10 +09:00
Hajime Hoshi
a0cff8961b
Modify docs
2014-12-24 02:08:03 +09:00
Hajime Hoshi
604c0d095f
Remove ImagePart
2014-12-24 02:04:56 +09:00
Hajime Hoshi
84f2e8aad2
Remove ebiten.Rect ( #37 )
2014-12-24 01:15:16 +09:00
Hajime Hoshi
27fe3d9ab8
Reduce depndencies on go-gl/gl
2014-12-23 04:32:36 +09:00
Hajime Hoshi
3e576c97f3
Modify docs
2014-12-23 04:10:28 +09:00
Hajime Hoshi
cd9efd3932
Implement image.Image at ebiten.Image ( #35 )
2014-12-23 01:27:11 +09:00
Hajime Hoshi
095c3ca380
Rename opengl.Image (that is originally wrong) -> opengl.Framebuffer
2014-12-23 00:01:22 +09:00
Hajime Hoshi
2620414409
Simplify shaders
2014-12-22 21:51:58 +09:00
Hajime Hoshi
a3b0831472
Change the texture pixel format to premultiplied alpha ( #36 )
2014-12-22 21:39:25 +09:00
Hajime Hoshi
df6ebd5a9c
go lint
2014-12-22 11:20:14 +09:00
Hajime Hoshi
baf18ba479
Rename variables
2014-12-22 11:18:05 +09:00
Hajime Hoshi
0f8ac49055
Unify RenderTarget and Image into Image ( #34 )
2014-12-22 11:10:08 +09:00