Write a CPlusPlus TOP

From Derivative
Jump to: navigation, 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 manipulate input and output of a TOP. You will be outputting a result into an OpenGL framebuffer. You can do this using any of the OpenGL mechanisms you wish (drawing using draw calls, uploading data using texture/data upload calls etc.)

Contexts[edit]

To avoid OpenGL state being used by TouchDesigner and the plugin stepping on each other, a separate GL context will be created for each CPlusPlus TOP. OpenGL commands should only be done between calls to context->beginGLCommands and context->endGLCommands() as those commands will bind/unbind the plugin's GL context. This rule also applies for work done in the constructor of the class.

CUDA[edit]

The CPlusPlus TOP can be used with CUDA. See the CudaTOP example project included with the TouchDesigner installation for an example.

See Also[edit]

Write a CPlusPlus Plugin
Write a CPlusPlus CHOP
CPlusPlus TOP
CPlusPlus CHOP

An Operator Family that creates, composites and modifies images, and reads/writes images and movies to/from files and the network. TOPs run on the graphics card's GPU.