today I may have a more difficult question.
I am hooking a program with DirectX12. The hook gives me the IDXGISwapChain3 on Present, so I can draw over it every frame. I already did some DirectX11 and 12 hooks before, but I am asking how would I setup Skia / Angle from a ID3D11Device.
Before you now answer, I know that I don't have to use that, but I want to, otherwise I would not ask.
So I was looking around in the internet, but I didn't any good documentations on how to do that correctly, but I am pretty sure that it is possible.
So this is what I expect to see:
- Initializing EGL with the already existing DirectX11 Device
- Initializing Skia with EGL (not sure?)
If you have worked with EGL or Skia before, please answer. This would help me so much. :D
Edit:
My goal is to be able to draw on SkCanvas every single frame over the hooked program (which uses DirectX12).
Edit2:
After trial and error I discovered that I can make a GrContext with a DirectX12 device:
GrD3DBackendContext c;
c.fAdapter = ...;
c.fDevice = device...;
...
auto cx = GrContext::MakeDirect3D(c);
How then would I make my surface with it?
SkSurface surface = SkSurface::Make...