Hajime Hoshi
95b4e67c77
internal/graphicsdriver/opengl: reduce context functions
2022-11-18 03:18:30 +09:00
Hajime Hoshi
e8810495cf
internal/graphicsdriver/opengl/gl: reland: refactoring: reduce opengles build tags
...
This is a reland of c9cff69dcb
.
Updates #292
2022-11-14 02:21:18 +09:00
Hajime Hoshi
e87e4ffbd2
Revert "internal/graphicsdriver/opengl/gl: refactoring"
...
This reverts commit c9cff69dcb
.
Reason: compmile error for browsers
2022-11-14 02:17:27 +09:00
Hajime Hoshi
c9cff69dcb
internal/graphicsdriver/opengl/gl: refactoring
2022-11-14 02:13:32 +09:00
Hajime Hoshi
8c49c88b08
internal/graphicsdriver/opengl: refactoring
2022-11-13 15:27:37 +09:00
Hajime Hoshi
a0a5f2b301
internal/graphicsdriver/opengl: remove SetGomobileGLContext
...
This change is needed to initialize the context at opengl.NewGraphics.
Updates #2451
2022-11-13 15:07:14 +09:00
Hajime Hoshi
5cfb7c9469
internal/graphicsdriver/opengl: make context_gles.go closer to context_gl.go
...
Updates #2451
2022-11-13 14:20:47 +09:00
Hajime Hoshi
c4abaa32f5
internal/graphicsdriver/opengl: initialize gl at init()
...
This changes context_gl.go a little closer to context_gles.go.
Updates #2451
2022-11-13 04:13:18 +09:00
Hajime Hoshi
a406904a51
internal/graphicsdriver: refactoring
2022-11-12 21:03:54 +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
1b3696a7ff
internal/graphicsdriver/opengl: fix comments
2022-10-31 12:59:27 +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
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