Close

Write a CPlusPlus TOP

Overview

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

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

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

See Also

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