Commit Graph

127 Commits

Author SHA1 Message Date
Humphrey Shotton
21cfe362c8
internal/graphicscommand: fix missing graphicscommand log (#1543)
Closes #1544
2021-03-15 02:14:03 +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
9a69c3ea9c graphicscommand: Add 'dst-region' to String of DrawTriangles command 2020-11-27 01:48:17 +09:00
Hajime Hoshi
e7fafb5527 ebiten: Add a new log to dump update count
Fixes #1425
2020-11-24 22:36:32 +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
d2c4a6fc9f graphicscommand: Remove unnecessary comments 2020-10-17 02:45:35 +09:00
Hajime Hoshi
20b4a28801 graphicscommand: Unexport RunOnMainThread 2020-10-14 23:37:28 +09:00
Hajime Hoshi
eed619ad0f graphicsdriver/metal, graphicsdriver/opengl: Reland: Remove the thread usages for performance
Instead, graphicscommand package has a thread.

Updates #1367
2020-10-13 02:46:31 +09:00
Hajime Hoshi
713eee1117 Revert "graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance"
This reverts commit 2942f10d9d.

Reason: Compile error on mobiles and runtime error on browsers
2020-10-13 02:12:02 +09:00
Hajime Hoshi
2942f10d9d graphicsdriver/metal, graphicsdriver/opengl: Remove the thread usages for performance
Instead, graphicscommand package has a thread.

Updates #1367
2020-10-13 01:50:54 +09:00
Hajime Hoshi
b2d618c2be mipmap, shareable: Refactoring: Remove SetGraphicsDriver 2020-10-13 01:36:52 +09:00
Hajime Hoshi
bf515bb594 Update version to v2.0.0-alpha 2020-10-04 04:30:40 +09:00
Hajime Hoshi
ac30377297 graphicscommand: Bug fix: Adjusting source regions must be done before checking merging
Fixes #1333
2020-09-05 00:42:51 +09:00
Hajime Hoshi
609a3c4e22 ebiten: Bug fix: Fix the texel calculation
In shaders, texCoord is always in texture0's texels. Convert them
at imageNTextureAt functions correctly.

Fixes #1290
2020-08-11 04:15:07 +09:00
Hajime Hoshi
69f87d5fd1 ebiten: Add new shader builtin functions: image[N]TextureBoundAt
Fixes #1287
2020-08-11 03:24:54 +09:00
Hajime Hoshi
523dc6f2a0 graphicscommand: Add comments 2020-08-11 03:17:50 +09:00
Hajime Hoshi
985ff2d43f graphicscommand: 0th image must be adopted to calculate the size 2020-08-11 01:38:00 +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
fb59901609 graphicscommand: Bug fix: build error 2020-08-04 01:08:29 +09:00
Hajime Hoshi
cf2f7009aa graphicscommand: Allow shader tests on browsers
Updates #1166
2020-08-04 00:59:27 +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
fe79bb27af graphicscommand: Refactoring 2020-07-18 23:25:16 +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
1fe2f47701 graphicscommand: Remove the source-region parts from the uniform variables 2020-06-30 00:44:05 +09:00
Hajime Hoshi
2a63512c6e driver: Add AddressUnsafe
This skips the source-region check and reduces 'if' branches from
shader programs.

AddressUnsafe is internal only so far. We might expose this value
later.

Updates #1210
2020-06-25 01:00:38 +09:00
Hajime Hoshi
484473b6d9 graphicscommand: Span to 1/3 pixels
The center of pixels is problematic as the behavior depends on GPU.
In order to avoid this, align the vertices with about 1/3 pixels.

Updates #929
Fixes #1171
2020-06-16 03:56:53 +09:00
Hajime Hoshi
d74f7d3a77 shareable: Add gaps between images
After this change, each image on the texture atlases has a
transparent border around it.

This change removes the hack to round texels not to violate the
source regions.

Fixes #1194
Updates #1171
2020-06-14 18:05:41 +09:00
Hajime Hoshi
ba36d5a8e9 shader: Reland: Add a predefined uniform variable: __viewportSize 2020-06-07 00:14:09 +09:00
Hajime Hoshi
fe308f1971 Revert "shader: Add a predefined uniform variable: Internal_ViewportSize"
This reverts commit 6f411842f0.

Reason: Test failures on internal/restorable
2020-06-05 04:36:09 +09:00
Hajime Hoshi
6f411842f0 shader: Add a predefined uniform variable: Internal_ViewportSize 2020-06-05 03:00:43 +09:00
Hajime Hoshi
eb1b06c326 graphicscommand: Adjust texels 2020-05-30 22:41:14 +09:00
Hajime Hoshi
b2eee7ee8a graphicscommand: Adjust regions for secondory and following images correctly 2020-05-30 15:52:56 +09:00
Hajime Hoshi
915aecb960 graphicscomand: Fix comments 2020-05-30 15:08:28 +09:00
Hajime Hoshi
90e03a65c0 graphicscommand: Update comments 2020-05-30 05:19:49 +09:00
Hajime Hoshi
833a364ba8 testing: Bug fix: Image's size should not be in uniform variables 2020-05-30 05:16:50 +09:00
Hajime Hoshi
f80719ef9a driver: Use slices for uniform variables instead of maps
Fixes #1172
2020-05-26 23:50:11 +09:00
Hajime Hoshi
85730b433e graphicsdriver: Bug fix: Pass texture natives as uniform variables correctly 2020-05-25 02:31:54 +09:00
Hajime Hoshi
465d8aa273 graphicscommand: Add IsShaderAvailable for other packages 2020-05-24 19:15:18 +09:00
Hajime Hoshi
6506c20f4e graphicscommand: Use an image in the uniform variables 2020-05-24 16:43:08 +09:00
Hajime Hoshi
d94b84b8de graphciscommand: Add coments 2020-05-24 02:51:37 +09:00
Hajime Hoshi
1a0d92267b driver: Add shader API and implement it on OpenGL
Updates #482
2020-05-23 22:09:12 +09:00
Hajime Hoshi
8fd377f1e3 driver: Add ImageID and use this
This is a preparation to introduce shaders. Shader programs
require images as uniform variables, but the current way would make
API complex unnecessarily.
2020-05-20 00:11:08 +09:00
Hajime Hoshi
9b8c547342 graphicscommand: Do not flush (glFlush) when commands are empty
Fixes #1140
2020-04-23 00:51:28 +09:00
Hajime Hoshi
3437f35444 graphicscommand: Fix debug messages 2020-04-08 13:48:22 +09:00
Hajime Hoshi
fa90e48eec graphicscommand: Show the number of indices when dumping the command 2020-04-05 14:38:54 +09:00