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
033997d928
internal/graphicsdriver/opengl: remove the built-in shaders
...
Updates #2369
2022-10-02 21:26:13 +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
35f597e682
internal/graphicsdriver: refactoring: remove FilterScreen
...
Closes #2282
2022-09-06 19:04:15 +09:00
Hajime Hoshi
63e3c4adea
Revert "internal/graphics: remove FilterScreen and use an original Kage program instead"
...
This reverts these commits
* 3259ef3daf
* 7c55065490
* 5bb70f485e
Reason: iOS crash. Probably we have to prepare a special rendering
pipeline for the final screen.
Closes #2278
2022-08-30 01:56:06 +09:00
Hajime Hoshi
5bb70f485e
internal/graphics: remove FilterScreen and use an original Kage program instead
...
Updates #2046
2022-08-26 17:41:29 +09:00
Hajime Hoshi
70f5e84098
internal/graphicsdriver: rename ReplacePixels to WritePixels
...
Updates #2236
2022-08-08 03:05:04 +09:00
mattn
2bacecca24
fix typos ( #2227 )
2022-08-03 22:40:39 +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
a6d415ebf2
internal/graphicsdriver/opengl: replace Get with NewGraphics ( #2146 )
...
This is a prepartion to return an error when a graphics driver, especially
DirectX, fails to initialize.
Updates #2142
2022-06-17 02:02:29 +09:00
Hajime Hoshi
ad380a32f4
internal/glfwwin: split GDK part to a new package internal/microsoftgdk
...
Updates #1162
2022-05-29 19:25:26 +09:00
Hajime Hoshi
736d77e0d2
internal/graphicsdriver: remove Graphics.NDCYDirection
2022-04-04 03:03:44 +09:00
Hajime Hoshi
02db3bad53
internal/graphicscommand: remove the dependency on a graphics driver from compileShader
...
Updates #2035
2022-04-04 02:09:08 +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
eeb5687b73
internal/graphicsdriver/metal, internal/graphicsdriver/opengl: change the return type to pointers
...
On second thought, returning pointers is more natural. Handling
nil is a caller's responsibility.
2022-03-24 13:20:36 +09:00
Hajime Hoshi
7bb7e45522
internal/graphicsdriver/metal, internal/graphicsdriver/opengl: change the return type to interface
...
Converting a nil with a pointer type to an interface type is no longer
a nil-nil interface, and then comparing with nil causes an unexpected
results.
2022-03-24 03:24:58 +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
7d0f95e9be
internal/graphicsdriver: refactoring: replace Uniform with []float32
...
Closes #2016
2022-03-13 03:42:13 +09:00
Hajime Hoshi
35a5c88901
internal/graphics: rename constants
2022-03-12 04:01:48 +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
Hajime Hoshi
15f62bfeb5
internal/graphicsdriver/opengl: Optimization: Cache texture variable names
2021-10-31 05:40:44 +09:00
Hajime Hoshi
9d51356eef
internal/graphicsdriver/opengl: Optimization
2021-10-31 05:17:23 +09:00
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
1f82bb297c
internal/graphicsdriver/opengl: Optimization: Avoid the empty interface
2021-10-30 02:28:57 +09:00
Hajime Hoshi
60f2c7ace6
internal/graphicsdriver/opengl: Optimization: Avoid creating slices for every frame (uniform variables)
2021-10-30 00:22:31 +09:00
Hajime Hoshi
b4f45edff8
internal/graphicsdriver/opengl: Optimization: Avoid creating slices for every frame
2021-10-30 00:13:57 +09:00
Hajime Hoshi
d3ac199aa9
internal/graphicsdriver/opengl: Optimization: Avoid fmt.Sprintf
2021-10-29 21:43:40 +09:00
Hajime Hoshi
3c1f8da7f8
internal/graphicsdriver/opengl: Optimization: Avoid interface conversion
2021-10-29 21:35:40 +09:00
Hajime Hoshi
58ea710a84
internal/affine: Rename UnsafeElements -> Elements as this is no longer unsafe
2021-09-04 18:08:27 +09:00
Hajime Hoshi
df710a5c63
internal/affine: Change UnsafeElements to take arguments
...
This will enable to suppress unnecessary array allocations in the
future.
Updates #1796
2021-09-04 17:38:30 +09:00
Hajime Hoshi
da08577095
internal/graphicsdriver/opengl: Refactoring
2021-08-14 04:05:18 +09:00
Hajime Hoshi
15ac69b8d5
internal/graphicsdriver/metal: Bug fix: Disable presentsWithTransaction on fullscreen
...
Closes #1745
2021-08-08 17:40:37 +09:00
Hajime Hoshi
e4329d0349
internal/driver: Refactoring: Reduce dependencies on affine
2021-07-27 12:19:50 +09:00
Hajime Hoshi
21aa96f9f5
internal/affine: Refactoring: Make ColorM interface
2021-07-27 12:10:22 +09:00
Hajime Hoshi
7e5b259dd2
internal/affine: Use a pointer of an array for UnsafeElements
2021-07-26 21:19:53 +09:00
Hajime Hoshi
50d2d7ed61
internal/graphicsdriver/opengl: Remove unused code using PBO
...
Updates #1678
2021-07-14 21:51:27 +09:00
Hajime Hoshi
6213c17abc
internal/driver: Add Graphics.Initialize
2021-07-07 13:58:42 +09:00
Hajime Hoshi
38ce325958
internal/graphicsdriver/metal: Skip clearing the screen on Metal
2021-07-07 01:45:51 +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
56f4e6b2d0
internal/graphicsdriver/opengl: Refactoring: Rename a variable
2021-07-03 02:41:37 +09:00
Hajime Hoshi
ff2dd6fe7e
internal/graphicsdriver/opengl: Refactoring: Unify two drawTriangles* functions
2021-07-02 00:02:21 +09:00
Hajime Hoshi
e9b6237f61
internal/driver: Refactoring: Merge two Draw* functions
2021-07-01 15:55:48 +09:00
Hajime Hoshi
b9d52c0267
internal/driver: Change InvalidImageID/InvalidShaderID to 0
2021-07-01 14:58:55 +09:00
Hajime Hoshi
73bf1f36e5
internal/driver: Define InvalidImageID / InvalidShaderID
2021-07-01 13:56:42 +09:00