Giter Club home page Giter Club logo

Comments (8)

sheridanis avatar sheridanis commented on August 12, 2024

FYI we use a w9100 fine with spout not requiring memory share on win 7

Sent from my iPhone

On 24 Jun 2016, at 10:11, Qlex42 [email protected] wrote:

Hi,

On my AMD W9100 with last Windows 7 x64 drivers, wglDXRegisterObjectNV fail in the spoutGLDXinterop::LinkGLDXtextures function.
I presume it is due to AMD driver bad supports of of the NVidia NV_DX_interop OpenGL extension.
This let spoutGLDXinterop::CreateInterop call MessageBoxA(NULL,"Cannot create DirectX/OpenGL interop","ERROR",MB_OK|MB_ICONEXCLAMATION);

Enforcing memoryShare instead of directX11 or directX9 solve this issue.

I'm wondering if Spout's error reporting could rely on a less noisy function that MessageBoxA.
This by letting Spout functions return HRESULT, DWORD from GetLastError or a custom enumeration.

Maybe to avoid API compatibility problems, a callback should be passed to Spout class allowing client application to chose between printf, MessageBoxA or other custom callback functions.

This will help client application to call Spout in background task thread or rendering loop, and react according to error codes.

By the way, Thanks a lot for this great open source library.
Best Regards


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

from spout2.

Qlex42 avatar Qlex42 commented on August 12, 2024

Thanks @sheridanis for this information. I will made some investigation about this. (I'm using current master branch of Spout2 in a shared Core 3.3 profile OpenGL context).

Spout's enhanced error reporting system is still a good feature request IMHO.

from spout2.

Qlex42 avatar Qlex42 commented on August 12, 2024

OK I found why my edge case didn't work:

In fact I have two graphics card on my computer: a W9100 and a W2100,
The first screen (primary display) is plugged on my W2100. The second screen is plugged on the W9100. My software use Spout sender on an OpenGL context created on the w9100 screen.
In this case wglDXRegisterObjectNV failed.
I suppose I have to call SpoutSender::SetAdapter correctly to fix this issue.

from spout2.

leadedge avatar leadedge commented on August 12, 2024

Hi Qlex42,

yes an error return system has been on the table, but lack of time etc. There is some start of it in the SpoutSharedMemory class written by Malcolm Bechard. I have only used a MessageBox where the error is final and recovery is not simple so most applications will exit at this point.

Please try SetAdapter and let us know how you get on. We tried this a little while back but it seems that the application has to open on the adapter you select.

from spout2.

Qlex42 avatar Qlex42 commented on August 12, 2024

Hi @leadedge,

The SetAdapter call fix my problem perfectly. Thanks for this.
It so great that Spout manage this kind of specific case.
I stay tuned for further Spout Enhancement.
All the best.

from spout2.

leadedge avatar leadedge commented on August 12, 2024

OK that's good. This is credit to Franz Hildgen.

Could you confirm that you open the application on the same adapter as "SetAdapter"? Another person had trouble with this before and I think this was the problem. I have no way of testing it.

from spout2.

Qlex42 avatar Qlex42 commented on August 12, 2024

OK great job Franz, thanks !

To be very precise with current AMD driver on Windows 7 64bit,
SetAdapter call should be done on the same adapter of the HDC used to create an OpenGL context with wglCreateContext.

To get the good adapter HDC, the getDC should be done on a windows HWND created on a screen coordinate plugged on the good adapter. The HWND creation position set as CreateWindowEx x and y parameters are very important.

If x and y are set to CW_USEDEFAULT, the windows HDC will be created for the adapter owning the screen defined as primary display.

Hope this can help.

from spout2.

leadedge avatar leadedge commented on August 12, 2024

Excellent. Will advise.

from spout2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.