Getting started with DX11 plugins/resources


hey guys,

i just recently tried to code my first plugin using DX11 resources and had quite a hard time to get started with it. the use case i’m trying to implement is actually pretty simple - still i failed. as there is hardly any documentation apart from the code on github and vux’s vveekendvvworkshop video (which is interesting but was made before the breaking changes in dx11 1.1) i have a hard time finding a good entry point to this topic.

here’s what i’m trying to achieve:
the aim is to create a new container-like datatype that combines some types (transforms, colors) and DX11 resources (e.g. a texture) just to be able to send them together over a link and be able to cons them more conveniently. (the greater plan is to do dynamic reordering like z-sorting on these types).

i know that this is more than just passing an object reference to an DX11Resource. from what i can read from the nodes in the DX11 core the classes using these resources need to implement interfaces like IDX11ResourceDataRetriever or IDX11ResourceHost to make it work - i just don’t know where to start.

does anybody have simple examples available or could give me a hand on this?
here’s what i’ve got so far. (153.7 KB)

the first aim is to have join/split nodes to create and retreive data from MyContainer and then a cons node for this type. interestingly just adding a reference to VVVV.Nodes.Generic breaks the possibilty to connect the join/split nodes. i’m aware of the DX11 Generic nodes for cons-ing ressources but again i don’t know how to start.

any help (simple examples or explanations) would be very much appreciated!




so the join needs the IDX11ResourceDataRetriever, and the split is an IDX11ResourceHost.

Furthermore, the Join needs this line:

        if (this.RenderRequest != null) { RenderRequest(this, this.FHost); }


what exactly do you need that for? got something in the pipeline, for any pintype though, not just dx11


i guess i’ve got it now - big thanks @velcrome for the useful pointers. will post the result here after some cleanup for reference…

@woei: the bigger picture here is to have some kind of BinSized z-sorting for some simple objects (i.e. params for quads like transforms, textures, colors, …) but not at layer level. right now i need this for a project with my students but i wanted to look into DX11 stuff at a plugin-level for a long time.
doing these kind of things with pins sounds interesting even though my usecase is not as fancy up until now.