Hajime Hoshi
1804d56777
Revert "all: open up for more destinations images ( #3013 )"
...
This reverts commit 46d171c3c5
.
Reason: MRT is now suspended. Let's revisit this when we work on MRT again.
2024-07-16 22:43:49 +09:00
Bertrand Jung
46d171c3c5
all: open up for more destinations images ( #3013 )
...
Updates #2930
2024-07-09 02:05:55 +09:00
Bertrand Jung
22fd1f107e
internal/graphics: renamed shader image count to specify src ( #3012 )
...
This just specifies that the constant refers to the number of source images passed to a shader.
This makes a distinction with the number of dst images, that could potentially be more than 1 in the future.
2024-06-10 02:02:47 +09:00
Hajime Hoshi
e5d10c47e7
internal/graphicsdriver: reland: rename FillRule constants
...
Updates #3006
2024-06-08 12:16:20 +09:00
Hajime Hoshi
4818768965
shaderprecomp: remove ShaderSourceID
...
`ShaderSourceID` was confusing as there was no guarantee the same ID is
used for the same source if Ebitengine versions are different.
`ShaderSource` should be kept as the built-in shader contents should not
be exposed.
Updates #2861
Closes #2999
2024-05-27 00:01:05 +09:00
Hajime Hoshi
83ae577c80
Revert "shaderprecomp: remove ShaderSource
and ShaderSourceID
"
...
This reverts commit 8be3bb41d5
.
Reason: removing `ShaderSource` unexpected exposes the source.
Updates #2999
2024-05-26 22:45:12 +09:00
Hajime Hoshi
8be3bb41d5
shaderprecomp: remove ShaderSource
and ShaderSourceID
...
This change simplifies the APIs to avoid some confusions around IDs.
Updates #2861
Closes #2999
2024-05-26 22:42:52 +09:00
Hajime Hoshi
10d9660125
shaderprecomp: implement for Windows
...
Closes #2861
2024-05-06 16:03:57 +09:00
Hajime Hoshi
5d4a68b0ea
internal/shaderir/hlsl: refactoring: separate calculation uniform offsets
2024-05-05 20:47:35 +09:00
Hajime Hoshi
a41af4528b
internal/graphicsdriver/directx: refactoring
2024-05-05 18:58:13 +09:00
Hajime Hoshi
caecd81f4e
Revert "internal/graphicsdriver/directx: add 'tearing' for EBITENGINE_DIRECTX"
...
This reverts commit b6252a41f2
.
Reason: We need more investigation about tearing and vsync=off
Updates #2858
2024-03-30 20:08:06 +09:00
Hajime Hoshi
b6252a41f2
internal/graphicsdriver/directx: add 'tearing' for EBITENGINE_DIRECTX
...
Now tearing happens only when 'tearing' is specified and vsync is off.
Closes #2858
2024-03-23 17:53:13 +09:00
Hajime Hoshi
770fcff4c2
internal/graphicsdriver/directx: bug fix: Go 1.22 + 32bit Windows + DirectX 12 didn't work well
...
Apparently, a pseudo padding was needed for D3D12_RESOURCE_DESC,
but this is still mysterious.
This change also add Go 1.22 to the GitHub Actions.
Closes #2867
2024-01-27 18:06:53 +09:00
Hajime Hoshi
e0ccd013ac
internal/graphicsdriver/directx: bug fix: depth should be passed by math.Float32bits
...
As depth was always 0, there was not an actual problem.
2024-01-21 21:43:09 +09:00
Hajime Hoshi
48e3c766f7
internal/graphicsdriver: remove Image.IsInvalidated
...
Updates #805
2024-01-09 00:30:21 +09:00
Hajime Hoshi
771e5685f8
internal/graphicsdriver: remove NeedsRestoring()
...
Updates #805
2024-01-08 23:27:28 +09:00
bsski
b8df1217c3
all: fix typos ( #2864 )
2023-12-17 22:42:34 +09:00
Hajime Hoshi
3ca6184294
ebiten: add a new FillRule: NonZero
...
Closes #2782
2023-11-06 12:11:38 +09:00
Hajime Hoshi
4e93efa5ac
internal/graphicsdriver: reland: add FillRule and replace boolean values with this
...
Updates #2782
2023-11-04 19:09:50 +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
1db0abc4ee
internal/graphicsdriver/directx: add comments
2023-10-29 00:19:36 +09:00
Hajime Hoshi
8274b32301
internal/graphicslibrary: refactoring: remove IsGL and IsDirectX
2023-10-15 17:30:16 +09:00
Hajime Hoshi
567e2fa04c
ebiten: add BlendOperationMin
and BlendOperationMax
...
Closes #2395
2023-10-13 01:56:33 +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
6f41a05264
Revert "internal/graphicsdriver/directx: remove tearing"
...
This reverts commit 78d3e4273b
.
Reason: tearing is potentially risky but needed for maximizing FPS.
Also, tearing is officially recommended by Microsoft (see [1])
Closes #2697
[1] https://github.com/microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingHelloWorld/DeviceResources.cpp#L520
2023-09-18 03:30:34 +09:00
Hajime Hoshi
e270dea460
internal/graphicsdriver: use []PixelsArgs for ReadPixels
...
Closes #2592
2023-08-17 03:06:48 +09:00
Hajime Hoshi
842c3cbfcd
internal/graphicscommand: use a slice to values instead of pointers
...
This should reduce heap allocations.
2023-08-16 23:23:30 +09:00
Hajime Hoshi
377b0b8502
internal/graphicscommand: rename WritePixelsArgs -> PixelsArgs
...
Updates #2592
2023-08-16 22:34:56 +09:00
Hajime Hoshi
d16b591a35
internal/graphicsdriver/directx: bug fix: use an associated IDXGIFactory
...
In DirectX 11, if a device and a factory are independently created,
some functions like MakeWindowAssociation doe't work well.
This change fixes the issue by getting a factory from a device and
using it.
Closes #2661
2023-05-01 19:17:08 +09:00
Hajime Hoshi
e98acd3dc7
internal/graphicsdriver: refactoring: use image.Rectangle
2023-04-29 01:12:05 +09:00
Hajime Hoshi
a56924b22f
internal/graphicsdriver/directx: refactoring
2023-04-09 16:49:52 +09:00
Hajime Hoshi
4473557e23
internal/graphicsdriver/directx: smooth rendering when resizing the window with DirectX 12
...
Updates #2615
2023-04-09 16:38:29 +09:00
Hajime Hoshi
2423733598
internal/graphicsdriver/directx: bug fix: wrong size was used when resizing
...
Updates #2633
2023-04-09 16:34:56 +09:00
Hajime Hoshi
2c088b9059
internal/graphicsdriver/directx: resize the swap chain after presenting is done
...
Updates #2633
2023-04-09 16:29:00 +09:00
Hajime Hoshi
730c7a2ad0
internal/graphicsdriver/directx: refactoring
2023-04-09 15:30:46 +09:00
Hajime Hoshi
78d3e4273b
internal/graphicsdriver/directx: remove tearing
...
This is basically a revert of 0035ba0bd1
.
I couldn't confirm that allowing tearing improved FPS. Rather, this
has a potential risk to cause an error at Present of the swap chain due
to an inconsistent argument, though I have not confirmed an actual issue.
Now the DirectX 11 driver was introduced, the situation has changed.
Updates #2034
Updates #2188
2023-04-09 14:47:51 +09:00
Hajime Hoshi
182ac21866
internal/goglfw: separate the Windows version detection to a new package winver
2023-03-31 02:16:01 +09:00
Hajime Hoshi
c0adcee12c
Revert "internal/graphicsdriver/directx: initialize the refresh rate explicitly for Windows 7"
...
This reverts commit a4bfe8a869
.
Reason: This doesn't take any effects.
Updates #2613
2023-03-30 22:40:53 +09:00
Hajime Hoshi
a4bfe8a869
internal/graphicsdriver/directx: initialize the refresh rate explicitly for Windows 7
...
This is an experimental fix inspired by Chromium/ANGLE
https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/renderer/gl/wgl/DXGISwapChainWindowSurfaceWGL.cpp;l=491-492;drc=79aa846e38739138918891e8b334fac464dd9b83
Updates #2613
2023-03-30 22:22:26 +09:00
Hajime Hoshi
09250ff4f3
internal/graphicsdriver/directx: adjust buffer count
...
Apparently the buffer count should be 1 with a non-flipping swap effect.
Updates #2613
2023-03-30 21:09:41 +09:00
Hajime Hoshi
61ced5127b
internal/graphicsdriver/directx: limit d3dcompiler versions
...
For example, the verions 45/44 are alpha and should not be used.
Updates #2613
Updates #2618
2023-03-30 17:54:42 +09:00
Hajime Hoshi
d22158b156
internal/graphicsdriver/directx: use non-flip swap effect for old Windows
...
Updates #2613
Updates #2619
2023-03-30 12:33:08 +09:00
Hajime Hoshi
0cd832f096
internal/graphicsdriver/directx: check the DLL availability at NewGraphics
...
Updates #2613
Updates #2618
2023-03-30 01:45:31 +09:00
Hajime Hoshi
3e477d0bbb
internal/graphicsdriver/directx: bug fix: d3dcomipler_47.dll might be missing
...
Updates #2613
Closes #2618
2023-03-30 01:12:46 +09:00
Hajime Hoshi
6858e4b60b
internal/graphicsdriver/directx: use QueryInterface to cast IDXGISwapChain to IDXGISwapChain4
...
QueryInterface is better in terms of error messages than a dumb
pointer casting.
2023-03-30 00:44:39 +09:00
Hajime Hoshi
7fa65ae983
internal/graphicsdriver/directx: reduce unnecessary usages of IDXGISwapChain4
...
IDXGISwapChain is enough for DirectX 11.
Updates #2613
2023-03-30 00:14:04 +09:00
Hajime Hoshi
c9f1696a5b
internal/graphicsdriver/directx: use CreateDXGIFactory instead of CreateDXGIFactory2
...
CreateDXGIFactory2 is available in Windows 8.1 and newer. This is not
necessary for the current Ebitengine implementation. Use the old version
CreateDXGIFactory to support Windows 8 and older.
Updates #2613
2023-03-29 23:56:17 +09:00
Hajime Hoshi
fe67399022
internal/graphicsdriver/directx: use CreateSwapChain instead of CreateSwapChainForHwnd
...
This is a preparation to use IDXGIFactory instead of IDXGIFactory4.
Updates #2613
2023-03-29 23:37:08 +09:00
Hajime Hoshi
ad1bb4b2cb
internal/graphicsdriver/directx: remove unused functions
2023-03-29 23:21:08 +09:00
Hajime Hoshi
1017161c36
internal/graphicsdriver/directx: refactoring
2023-03-29 18:26:11 +09:00