-
-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/graphicsdriver: use DirectX on Windows #1007
Comments
That's exactly what we do for Allegro as well. There's a lot of code in Allegro 5 that can be used as an example of hop to use Directx 9 (not 12, sorry) on Windows, which you could use as an inspiration. |
Thanks. BTW, I'll adopt Direct X 10, which is the oldest Direct X we don't have to care about device-lost. |
That might be a great idea, since DeviceLost extremely annoying, and Allegro5 needed a lot of handling for that as well. And I guess most people can user DirecxtX 10 now. 👍 |
As #993 was fixed (probably), I de-prioritize this work. |
https://docs.microsoft.com/en-us/windows/uwp/gaming/porting-your-directx-9-game-to-windows-store DirectX 11 seems better for UWP rather than DirectX 10. |
If Ebiten games are UWP, Ebiten games will work on Xbox. DirectX is necessary for this. I tend to think I'll go with DirectX 12 rather than 11. Windows 10 should preinstall DirectX 12. I'm not sure about 11. As a fallback, OpenGL implementation will remain. |
Came across this in my travels and thought it might be a useful resource if you decide on DirectX11 rather than DirectX12. "re-pin: minimal d3d11 reference / tutorial implementation; a small uncluttered direct3d 11 setup and rendering primer for newcomers to the api. complete, runnable single-function app. no modern c++ / oop / obscuring cruft." From this tweet: https://twitter.com/d7samurai/status/1331659636232085505 |
Thanks, that's a brief tutorial, but I don't think DX12 will be drastically complex compared to DX11... |
I prioritized this work as requested. |
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
This is a preparation to distinguish Hadamard product and matrix product for HLSL. Updates #1007
This is a preparation for DirectX / HLSL. Updates #1007
…ialRegionPixels This is necessary to remove the graphics driver usage from (*ebiten.Image).At. And this is necessary to determine the graphics driver after the window becomes transparent or not. Unfortunately, it is not obvious to make a transparent window with DirectX. Then, the determination of a graphics driver should be delayed. Updates #1007
With DirectX, the graphics driver cannot be determined until the main loop starts, as a transparent window cannot be treated with DirectX so far. On the other hand, compiling shaders requires a graphics driver as it requires information about Y directions of NDCs and framebuffers. This change delays compiling shaders until the graphics commands are actually executed in the main loop. Updates #1007 Updates #2019
This is a preparation for the DirectX driver. Updates #1007
The text was updated successfully, but these errors were encountered: