1
\$\begingroup\$

I found an excellent code here that does almost everything I need: running an HLSL shader on memory texture to process video frames into another texture buffer without displaying it. http://www.codeproject.com/Articles/207642/Video-Shadering-with-Direct-D?msg=5092502#xx5092502xx

My question is: can DirectX9 be used to work purely with in-memory data without display and without specifying a HWND handle? What needs to change in the code if not giving it a HWND?

The code I'm writing is a DLL that has no graphical interface.

\$\endgroup\$
1
\$\begingroup\$

The short answer is that DirectX CreateDevice will simply fail without a HWND. However, a HWND can easily be created with this:

HWND dummyHWND = CreateWindowA("STATIC", "dummy", NULL, 0, 0, 100, 100, NULL, NULL, NULL, NULL);
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.