Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Rendering using D3D9 #182

Open
bugproof opened this issue Sep 16, 2020 · 3 comments
Open

Rendering using D3D9 #182

bugproof opened this issue Sep 16, 2020 · 3 comments

Comments

@bugproof
Copy link

bugproof commented Sep 16, 2020

Is it possible to render directly with D3D9 without rendering using CPU first (e.g. https://github.com/c-smile/sciter-sdk/blob/master/demos.lite/win32-bitmap/plain-win.cpp)? Is there any way to implement a custom renderer in form of some plugin so it can be used without access to the source code?

@c-smile
Copy link
Owner

c-smile commented Sep 16, 2020

Sciter uses Direct2D as primary rendering backend on Windows.

Direct2D uses DXGI infrastructure, see:

https://docs.microsoft.com/en-us/windows/win32/direct2d/direct2d-and-direct3d-interoperation-overview and
https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/d3d10-graphics-programming-guide-dxgi

Seems like DXGI can work only with D3D10 but I am not sure.

Check
https://github.com/c-smile/sciter-sdk/tree/master/demos.lite/sciter-directx

Try to convince DXGI to work on top D3D9 stack, it seems that D3D10 device can be created on D3D9:
https://docs.microsoft.com/en-us/windows/win32/direct2d/direct2d-and-direct3d-interoperation-overview#creating-a-dxgi-surface

@bugproof
Copy link
Author

It's not possible to use Direct2D with D3D9 https://stackoverflow.com/questions/43409898/retrieve-id2d1devicecontext-from-idirect3ddevice9

I couldn't find any mention of creating D3D10 device on D3D9. It would be nice if rendering backend could be swapped with something else but I think it doesn't expose any abstract class/interface so we could replace it.

@c-smile
Copy link
Owner

c-smile commented Nov 26, 2020

You can use Sciter.Lite and render content into a bitmap (texture). See: https://github.com/c-smile/sciter-sdk/tree/master/demos.lite/win32-bitmap demo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants