Data type: render

Documentation > Data Types > Data type: render

Data type: render

The render data type is rather special in VZX. Rather than actually transmitting data between modules, it controls in which order rendering happens. It is also the only data type which accepts multiple connections.

Multiple connections

When 2 or more things have been connected to a module with a render-in parameter, a call goes out to them in order to draw themselves.

The order can be modified by double-clicking on the render input. Then the connections will be exposed and you can re-order them.

Here is what this looks like:

You can now left-click and drag them around, re-ordering them.

Tunnel Modules Affecting the Rendering Chain

Modules that have render parameters as both in- and outputs can act to modify the state which affects rendering rather than actually rendering anything.

In the example above, the red and green modules have been affected by the blend mode module (SRC_ALPHA, ONE - a.k.a. saturated add). However, the blue rectangle rendered opaquely, unaffected by the blend mode since the blend mode module reset the blend mode to the default after the modules connected to it rendered.

Thus, the order is:

The yellow color is the result of red plus green.

There are a lot of tunnel rendering modules that can be chained together. Look at the category renderers_opengl for more examples of this type of module.

Capture Modules

There is one additional class of modules that are worth mentioning here. Capture modules work by starting the capture before the rendering chain starts, then ending the capture after everything connected to it has rendered successfully.

In this example, a colored_rectangle rendered onto a render_surface_single which has very low resolution and nearest neighbour interpolation (thus the jaggies).

Modules with render