Giter Site home page Giter Site logo

Comments (5)

leadedge avatar leadedge commented on September 26, 2024

Perhaps "CreateReceiver" is not the best name for the function.

A receiver is declared either as an object in the header file or as a pointer and the object created in the application as necessary. That is all you need to do in advance.

A receiver has information about the sender it receiving from. If it is not receiving, then there is no information and it is not yet "Created".

The CreateReceiver function will look for a sender and connect to it when found, so the function can be called repeatedly in a loop until a sender is detected.

from spout2.

Golem235 avatar Golem235 commented on September 26, 2024

Thank you for your response.
In my case, unfortunately, I have no access to the GLextentions in my render loop.
Therefore, I would like to have created the receiver at the beginning of the program and receive only the image in the render loop. Data, such as the width and height of the image are already known to me at that time.

I do not currently transfer any texture but an image as unsigned char *.

Is there still no way to create the receiver initially and only receive the image in the render loop?

from spout2.

leadedge avatar leadedge commented on September 26, 2024

Could you explain more about what the problem is? Do you mean that you have no OpenGL context in the render loop? If so, the OpenGL texture sharing functions will fail, including ReceiveImage. Is the render loop in a separate thread?

It might be possible with memoryshare mode if you use ReceiveImage in the render loop with the known sender name and width and height, but I am not sure. You would have to set memoryshare mode in SpoutSettings and both the sender and your program would have to be started after the mode is set.

This is not very useful and if there is a separate thread for the render loop which does not have an OpenGL context it might be possible to create one using "receiver.spout.interop.InitOpenGL()".

from spout2.

Golem235 avatar Golem235 commented on September 26, 2024

Thank you very much, you saved my day.
I already used the memorysharemode but without openGL the receiver wasn't able to load the GLextentions.

Running receiver.spout.interop.InitOpenGL() first, the receiver is able to connect and receive my image.

from spout2.

leadedge avatar leadedge commented on September 26, 2024

OK that's good to know.

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.