Issue creating spout sender

I’m looking at creating an OBS spout out filter, and the basic filter structure seems to be functioning, but I’m coming across some issues with getting spout to work properly:
spoutptr = GetSpout(); appears to be non-null, probably good
spoutptr->CreateSender(“asdf”, 300, 300); appears to be false :confused:

Any ideas of what might be wrong?

This is excellent. Many thanks for offering your expertise with this.

The most likely reason for failure is lack of OpenGL context.

If you are using the library, one possibility is to use the latest beta version which includes error logging :

https://github.com/leadedge/Spout2/tree/beta/SPOUTSDK/SpoutLibrary

This is well advanced and I don’t expect to make any more changes. I have tried dropping in the relevant files to an existing project and had no problems. If you have trouble, you can quickly change back and I will see what else can be done for debugging.

Once you have the new library files ready, you can start a log :

spoutptr->EnableSpoutLog();

Then a console will open and reveal any errors. If a console is a problem for OBS you can create a log file :

spoutptr->EnableSpoutLogFile("OBS Sender.log");

You can find the log file at : C:>Users>username>AppData>Roaming>Spout

If OpenGL context is the problem, it will show up.

Could you first try this and see what it reveals. If it’s no help I will assist further. You can also send me a private message here to correspond by email.

I just tested the latest library files. Be careful to select 64bit or 32bit. Otherwise it re-compiled and worked OK.

Looks like the beta slightly breaks the receiver code, but I’ll worry about that later.
Console window opens nicely, looks like it was the OpenGL context (which ironically, I’m not too good with graphics yet)
Definitely liking the new functions in the beta! I’m back to hacking my way through making the plugin :smiley:

OK that’s good to know.

I had trouble with compatibility of existing functions because the library does not allow overloads. The only solution I could come up with for an existing application was to change the names. “ReceiveTexture” becomes “receiveTexture”. If you find other problems please let me know.

But for a new application it’s better to use the new receiver functions that automatically connect to a sender. They are quite easy to use.

I hope you make progress and succeed with the project.