C++ code for creating DX11 texture to share with vvvv?


#1

Anyone have some C++ code snippets of how to properly create a texture to share with a vvvv instance? I cannot use Spout as the textures I need to share are R32, not supported by Spout. I can take care of getting the handle into vvvv - I’m just not a C++ DX11 coder so need an example of creating the texture I can directly fill, and getting the handle value that vvvv can use. Thanks!


#2

Could you process the r32 into channels of an rgb8 texture? Easy to do in a shader if you have access to shaders in the other app.


#3

@catweasel that is certainly a creative solution! But I suspect getting a shader running from scratch will be more complicated than just creating a shared texture - the sending app is a very simple C++ one that just grabs data from a camera.


#4

max 5 mins googling yielded this guy:


tldr their second post says their first code chunk was right, they just tried to use it accross GPU’s which you can’t do with native DXGI API’s. Also you can write a vvvv plugin in C++/CLI and create the resource directly in vvvv. SlimDX has resource constructors from ID3DResource* pointers.


#5

Yeah I saw that before posting here. I wanted to see if anyone had code known to work with vvvv, such as if the number printed out at the bottom of that example is the proper number to pass into the vvvv node, and if the right flags are being used. In particular, with the notion of “Sync” - I have found some examples of that (and this simple case) which differ greatly.


#6

and how about direct vvvv implementation with C++/CLI?