Comments (10)
I assume that this works for DirectX 11 because CreateDX11device does not need a window handle.
For DirectX 9, hwnd is used for "CreateDeviceEx. The specification says that "For windowed mode, this parameter (hFocusWindow) may be NULL only if the hDeviceWindow member of pPresentationParameters is set to a valid, non-NULL value.", so that means one way or another hwnd is needed, so I included it twice.
CreateDeviceEx probably needs a check for NULL hwnd.
I am surprised that the interop still works. After wglGetCurrentContext(), does wglGetCurrentDC() return NULL?
from spout2.
Indeed wglGetCurrentDC return a non NULL value. So an offscreen OpenGL context have a Device Context but no windows attached on it.
It seems normal because I create offscreen openGL context with this command list:
HDC hDC = getDC(commonMainHWND); // new DC handle
HGLRC hRC = wglCreateContext(hDC);
wglShareLists(commonRC, hRC);
...
Indeed, this seems to work with DirectX11 only. If I remove the hWnd Null check from SpoutSDK.cpp , DirectX9 implementation do not seems to be happy. So if(g_hWnd == NULL && interop.m_bUseDX9) seems to be the best option.
If I understand the specification, maybe DirectX9 in full screen mode can probably benefit from this too. But I have no code available to made this kind of tests.
By the way, thanks a lot for your reactivity.
from spout2.
In practice I find that hwnd can be NULL for CreateDeviceEx, probably because the device is never used for rendering and is is only used to create a shared texture. But the function is never intended to work in this way, so hwnd should be included I think.
You will notice a comment in "OpenSpout" (which gets g_hWnd), so the test for hwnd could be included in "OpenSpout" and would then be redundant in "OpenReceiver".
I will give this more thought before making any changes. Meanwhile it solves the problem for your project.
from spout2.
Latest commit changed OpenSpout to fail for DX9 if no hwnd.
OpenSpout precedes the tests in OpenReceiver so they are no longer needed. Please let me know if this modification works or does not work.
from spout2.
Hi Lynn,
Indeed your change seems to fix my issue perfectly.
Thanks a lot for this.
Tested with AMD FirePro w2100, w9100 and NVidia 780GTX
Regards.
from spout2.
OK thanks for the quick response.
It's interesting that your FirePro W2100 works OK. There has been some trouble with FirePro W7100. That seemed to require DirectX 11. It caused some corruption problem and the cause is unknown.
from spout2.
I only test Spout Receiver with W2100 W9100 and 780GTX with DirectX 11 and Memory Share successfully. Because my receiver use offscreen rendering context, I cannot test DirectX9 for now.
For spout Sender, Its working with W2100, W9100, 780GTX, DirectX 9, DirectX 11 and Memory Share perfectly.
(All in Windows 7 SP1 64)
(for AMD my driver version is 15.301.2601)
Hope this can help.
from spout2.
Yes this information does help and adds to the knowledgebase. Windows 7 might be the key, but who knows. I will close this one for now. Good luck with your project.
from spout2.
Thanks you for all of this,
Our project with Spout support public release will be ready soon.
I hope to made its logo and appears on the spout.zeal.co web site if possible.
Best regards.
from spout2.
OK sounds good. Email direct to [email protected] with the logo image - png if it has transparency. Feel free to make a post on the Announcements forum.
Edit : or Showcase as you wish.
from spout2.
Related Issues (20)
- I found 1-2 frame delay fluctuation when I used spout for texture transmission. How can I eliminate this delay? HOT 7
- Windows on ARM binaries missing HOT 8
- Exclude binaries from repo HOT 1
- Recommended API and method HOT 4
- A way to build Demo/SpoutSender.exe and Demo/SpoutReceiver.exe HOT 1
- Getting nullptr textures with spout receiver HOT 5
- Spout with WebGPU HOT 6
- Receiver的图像翻转了,如何把他摆正方位 HOT 2
- It seems that Directx 12 support is not included in pre-built binaries of the libraries by default? HOT 2
- Questions about SpoutDX and SPoutDX12 HOT 5
- Release 2.007.014 seems incorrectly tagged as v2.005 HOT 1
- Spout2 suddenly not working in obs HOT 3
- Global registry settings HOT 3
- Multiple Senders in SpoutDX HOT 4
- CPU sharing flag is always false in OpenSpout HOT 7
- Small code issue in SpoutGL.cpp HOT 3
- Use SendImage without using OF, Cinder, etc. HOT 2
- flickering because receiver sometimes can't access the shared texture. HOT 5
- Add ossia to the list of Spout-compatible software :) HOT 3
- Should the solutions be removed from the repo? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spout2.