VJ UNION

Cover image for SpoutLink - Receives in any D3D11 format, sends in D3D9 compatible BGRA format
vdmo
vdmo

Posted on

SpoutLink - Receives in any D3D11 format, sends in D3D9 compatible BGRA format

SpoutLink

https://github.com/leadedge/SpoutLink

Spout texture sharing for Windows uses DirectX 11 shared textures that allow sharing directly between different Windows DirectX graphics APIs.

The texture formats that can be shared include 8 bit BGRA, 8 bit RGBA, 10 bit RGBA and 16 bit or 32 bit float RGBA. The default used for Spout applications is BGRA (DXGI_FORMAT_B8G8R8A8_UNORM).

Compatibility for these formats requires the receiving application to be based on DirectX 11, Directx 12, OpenGL or Vulkan.
Applications based on DirectX 9 can receive Spout shared textures with only two formats.

  • DXGI_FORMAT_B8G8R8A8_UNORM (BGRA with alpha)
  • DXGI_FORMAT_B8G8R8X8_UNORM (BGRX alpha disregarded)

For example, a sender application generating shared textures with RGBA format (DXGI_FORMAT_R8G8B8A8_UNORM) is not compatible with a DirectX 9 Spout receiver even though it will be successfully received by other applications as listed above.

SpoutLink is an OpenGL application designed to overcome this problem by receiving in all possible formats and re-sending in the default BGRA (DXGI_FORMAT_B8G8R8A8_UNORM) format which is compatible with DirectX 9.

Open SpoutLink, and select the sender application required. In the DirectX 9 receiving application, select the sender named "SpoutLink" which is a direct copy of the original but with a compatible format.

Building the project

The project is for Openframewoorks and depends on :

ofxWinMenu\
Spout SDK

1) Download the ofxWinMenu addon and copy to the Openframeworks addons folder
2) Download the SpoutGL folder of Spout SDK and copy to a "SpoutGL" folder within the Openframeworks folder.
3) Download this project and copy to a "SpoutLink" folder within the Openframeworks "apps\myApps" folder.

C:\OPENFRAMEWORKS
    addons
        ofxWinMenu 

Open the solution file SpoutLink.sln with Visual Studio 2022
Set to "Release" "x64" and build "SpoutLink".

Discussion (0)