Write a CPlusPlus TOP

From Derivative
Jump to navigation Jump to search

Overview[edit]

Make sure you've read through Write a CPlusPlus Plugin first for general information about writing a plugin for a CPlusPlus TOP.

The CPlusPlus TOP allows you to write C++ code to create a TOP that can output multiple textures. Currently you can create your output by filling a CPU memory buffer (TOP_ExecuteMode::CPUMem) or by filling a cudaArray buffer (TOP_ExecuteMode::CUDA).

Most of the documentation is held in the header files for the C++ API. The samples also contain a lot of comments about the workflow.

CUDA[edit]

The CPlusPlus TOP can be used with CUDA. See the CudaTOP example project included with the TouchDesigner installation for an example. Note that any CUDA operations that occur in your C++ code must occur on the main thread, between calls to OP_Context::beginCUDAOperations() and OP_Context::endCUDAOperations().

See Also[edit]

Write a CPlusPlus Plugin
Write a CPlusPlus CHOP
Upgrading Custom Operators and CPlusPlus Plugins to 2022 and Newer Builds
CPlusPlus TOP
CPlusPlus CHOP