Git Product home page Git Product logo

Comments (7)

leadedge avatar leadedge commented on July 22, 2024

If you are using a single sender/receiver pair, you can use SetFrameSync / WaitFrameSync. There are examples in the Beta branch for both sender and receiver.

from spout2.

ChenTianSky avatar ChenTianSky commented on July 22, 2024

If you are using a single sender/receiver pair, you can use SetFrameSync / WaitFrameSync. There are examples in the Beta branch for both sender and receiver.

There will be lost frames.
image
image

from spout2.

ChenTianSky avatar ChenTianSky commented on July 22, 2024

And receive will find significant jitter when receiving at a frame rate of 60 frames

from spout2.

leadedge avatar leadedge commented on July 22, 2024

Event sync has been implemented by collaboration with a developer who requires sync of sender to receiver. The functions were reviewed recently to enable/disable sync and have been tested successfully.

The examples have not been updated yet but I had a look at them regarding missed frames. In this case, sender synchronizes to the receiver. I find no missed frames unless window events interfere, such as click on the caption. Without sync enabled, there are missed frames by just moving the mouse over the window which confirms that the sync functions are working. The new examples will include binaries for testing.

However, the examples are OpenGL and I see Direct3D 11 in your images. I have not tested the sync methods with DirectX. To compare with OpenGL, the present method should synchronize with vertical blank 'Present(1, 0)'.

from spout2.

ChenTianSky avatar ChenTianSky commented on July 22, 2024

Yes, I use Direct3D 11, there are missing frames during synchronization, I think it is caused by shared textures being repeatedly written at high frame rates, above is my guess, I have not confirmed, if you complete your example, or have any suggestions for this solution, please reply to me, thank you very much

from spout2.

leadedge avatar leadedge commented on July 22, 2024

Frames are not actually written for the receiver, just the handle to the texture for the receiver to read. The timing is only affected by the write and read of that handle in shared memory. If the frames are produced at 60fps, that corresponds to the OpenGL examples.

I need to reproduce the problem before I can solve it. Which application uses "SetFrameSync". Is it the sender or receiver? Are you using "Present (0, 0)" or "Present (1, 0)".

There can be other issues with the graphics driver. Is it Nvidia or something else? Is this a laptop?

from spout2.

leadedge avatar leadedge commented on July 22, 2024

I tested the sync functions with the SpoutDX examples and they work correctly.

You can download the projects from here. Unzip to the "SpoutDX" folder. There is a readme file and pre-built binaries in the "Tutorial04_Sync/BINARIES" folder.

Press and release the Space bar in each application to disable/enable sync. The receiver console will show missed frames when sync is disabled.

Edit
I left out a file from the BINARIES folder
Copy "seafloor.dds" from the "Tutorial07_Sync" folder.

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.