Hajime Hoshi
e98acd3dc7
internal/graphicsdriver: refactoring: use image.Rectangle
2023-04-29 01:12:05 +09:00
Hajime Hoshi
61ee811579
internal/graphicsdriver: define Resetter
2023-03-22 18:35:46 +09:00
Hajime Hoshi
ece60af1b7
internal/graphicsdriver/metal: stop using presentsWithTransaction
...
presentsWithTransaction caused many troubles. The critical thing was
that nextDrawable sometimes took more than one second when a user
inputs with NSTextView.
Fortunately, applications work well even without presentsWithTransaction.
Updates #1029
Updates #1196
Updates #1745
Updates #1974
2022-12-27 19:00:56 +09:00
Hajime Hoshi
0a6813c17f
internal/graphics: use flatten []float32 slice instead of [][]float32
...
Closes #2479
2022-12-03 20:23:58 +09:00
Hajime Hoshi
8cc6fa82fd
internal/graphicsdriver/opengl: remove fnIsContextLost
...
As restoring from context lost doesn't happen on browsers, isContextLost
doesn't have to be called.
2022-11-17 12:43:26 +09:00
Hajime Hoshi
419bb4c1e9
all: use uint32 instead of float32 for uniform values
...
This is a preparation for other types of uniform values.
Updates #2305
2022-11-12 20:28:07 +09:00
Hajime Hoshi
d73e8f785d
internal/graphicsdriver: render various destination regions as one command
...
Closes #2232
2022-11-04 20:49:44 +09:00
Hajime Hoshi
a5993f09a2
internal/graphicscommand: refactoring: add preserved uniform variables at the graphicscommand package
...
This is a preparation to skip setting unnecessary uniform variables
like dstRegion.
Updates #2232
2022-10-30 22:30:52 +09:00
Hajime Hoshi
09a7d39874
internal/graphicsdriver: add Blend struct
...
This is a preparation to specify blend factors and blend operators.
Updates #2382
2022-10-16 01:08:26 +09:00
Hajime Hoshi
08e6f5af86
internal/graphicsdriver: remove FramebufferYDirection
2022-10-14 00:05:59 +09:00
Hajime Hoshi
080d936d42
internal/graphics: remove unused arguments from DrawTriangles
...
Updates #2369
2022-10-02 22:13:31 +09:00
Hajime Hoshi
cff64894cc
internal/affine: refactoring: use slices instead of array pointers
...
This doesn't change the performance at the test using ColorM:
```
name old time/op new time/op delta
ColorMScale-8 1.11µs ±43% 1.23µs ±70% ~ (p=1.000 n=5+5)
```
2022-09-30 22:20:32 +09:00
Hajime Hoshi
b2f874a244
image/rectangle: read pixels only for necessary parts
...
Closes #2274
2022-08-27 23:23:33 +09:00
Hajime Hoshi
70f5e84098
internal/graphicsdriver: rename ReplacePixels to WritePixels
...
Updates #2236
2022-08-08 03:05:04 +09:00
Hajime Hoshi
afed6a83c6
internal/graphics: change the naming convention: Num -> Count
...
This change also renames ebiten.MaxIndicesNum -> ebiten.MaxIndicesCount.
2022-07-13 02:02:44 +09:00
Hajime Hoshi
8522bfd0bf
internal/graphicscommand: bug fix: replacePixelsCommand should not read pixels
...
Reading pixels, writing pixels, and using the image as a source might
cause a flaky behavior with Metal. Stop reading pixels if possible.
Closes #2180
2022-07-05 23:30:26 +09:00
Hajime Hoshi
736d77e0d2
internal/graphicsdriver: remove Graphics.NDCYDirection
2022-04-04 03:03:44 +09:00
Hajime Hoshi
9be454ef25
internal/graphicsdriver: remove an old comment
2022-04-03 02:53:43 +09:00
Hajime Hoshi
3fafc05411
internal/graphicsdriver: remove Graphics.HasHighPrecisionFloat
...
Updates #879
2022-04-02 05:19:30 +09:00
Hajime Hoshi
79e93d3b12
internal/graphicsdriver: introduce the DirectX driver
...
Closes #1007
2022-03-26 20:09:34 +09:00
Hajime Hoshi
cd57bccbfc
internal/graphicsdriver: let some functions return an error
...
This is a preparation for the DirectX driver.
Updates #1007
2022-03-21 22:23:12 +09:00
Hajime Hoshi
0dcf43b350
internal/graphicsdriver: reorder the member
2022-03-21 22:05:21 +09:00
Hajime Hoshi
5fe6791b5d
internal/graphicscommand: add a new paramter 'mask' to ReplacePixels
2022-03-21 01:11:01 +09:00
Hajime Hoshi
7d0f95e9be
internal/graphicsdriver: refactoring: replace Uniform with []float32
...
Closes #2016
2022-03-13 03:42:13 +09:00
Hajime Hoshi
b22309a0e5
internal/graphicsdriver: replace Pixels with ReadPixels
...
Now preparing a byte slice is the caller's responsibility.
2022-02-27 20:03:13 +09:00
Hajime Hoshi
566957dc1c
internal/graphicsdriver/metal: invert Y at the vertex shader
...
Instead of using a negative height in the viewport, invert the Y direction
at the vertex shader. This is a little more readable as a negative height
is hacky.
This is a preparation for DirectX 12. DirectX 12's coodination system
is very similar to Metal, but doesn't treat a negative height in its
viewport unfortunately.
Updates #1007
2022-02-27 01:53:03 +09:00
Hajime Hoshi
8b7273b74a
internal/graphicsdriver/metal: call PresentDrawable only when necessary
2022-02-22 01:37:13 +09:00
Hajime Hoshi
df60c4c92d
internal/driver: rename to internal/graphicsdriver
2022-02-06 20:41:32 +09:00