Commit Graph

110 Commits

Author SHA1 Message Date
Hajime Hoshi
f695df5924 Revert "internal/graphicsdriver: add FillRule and replace boolean values with this"
This reverts commit 38cf964a3b.

Reason: build failure on Windows
2023-11-04 19:02:40 +09:00
Hajime Hoshi
38cf964a3b internal/graphicsdriver: add FillRule and replace boolean values with this
Updates #2782
2023-11-04 18:57:31 +09:00
Hajime Hoshi
f2544a1bd9 internal/graphicsdriver: use []uint32 instead of []uint16 for indices
Updates #2612
2023-11-04 04:39:17 +09:00
Hajime Hoshi
8274b32301 internal/graphicslibrary: refactoring: remove IsGL and IsDirectX 2023-10-15 17:30:16 +09:00
Hajime Hoshi
4ca3fa5e57
internal/graphicsdriver: replace Region with image.Rectangle (#2791)
Closes #2790
2023-09-28 14:29:55 +09:00
Hajime Hoshi
4f69ca4ea9 internal/graphicsdriver/opengl: add a debug mode with a build tag ebitenginegldebug
In the debug mode, GetError is inserted in each GL function call.

Closes #2650
2023-04-22 13:17:08 +09:00
Hajime Hoshi
8cbf545e0f internal/graphicsdriver/opengl: revert commits for graphics.Indices
This change reverts these commits:

* 13d3a0487b
* 4cd98d512e

Reason: this caused crashes on Android.

Updates #2460
Closes #2610
2023-03-22 17:28:45 +09:00
Hajime Hoshi
4cd98d512e internal/graphicsdriver/opengl: refactoring 2023-03-21 23:06:49 +09:00
Hajime Hoshi
23e90b7e39 internal/graphicsdriver/opengl: refactoring 2023-03-20 22:48:20 +09:00
Hajime Hoshi
8ae6ea5ff6 internal/graphicsdriver/opengl: update comments 2023-03-20 01:42:54 +09:00
Pierre Curto
4de807cc44
all: fix typos (#2558)
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
cf76e3c646 internal/graphicsdriver/opengl: better place to reset uniform variables
Updates #2517
2023-01-04 01:36:04 +09:00
Hajime Hoshi
edf35b02cb internal/graphicsdriver/opengl: record last uniform variables and reset them before swapping buffers
This is basically a revert of 6b4c696b31.
This change resets the last uniform variables before swapping
buffers.

Updates #2517
2023-01-03 03:13: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
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