Protocol

FxHostResourcesAPI

The FxHostResourcesAPI protocol defines methods that the host application implements to allocate and track resources.

Declaration

@protocol FxHostResourcesAPI

Overview

These methods allow the host to allocate resources such as memory, OpenGL textures, and PBuffers, and allows the host application to spawn threads to do work for a plug-in.

Topics

Allocating Resources

- allocateMemory:clear:clearWith:error:

Allocates a block of RAM, possibly filling it with the specified value.

Required.

- createPBuffer:withTarget:error:

Creates a host-tracked pBuffer for your plug-in to use

Required.

- trackExternalAllocation:

Allows the host application to track the memory it did not allocate

Required.

Deallocating Resources

- freeMemory:error:

Frees a block of memory allocated with -allocateMemory:clear:clearWith:error:

Required.

- deletePBuffer:error:

Destroys a host-tracked pBuffer

Required.

- deleteTexture:error:

Deletes a texture that the host allocated for you

Required.

Performing a Method

- performSelector:onTarget:withObject:onThreads:waitUntilDone:error:

Performs a method on multiple threads, possibly waiting until it completes

Required.

Available Processing Cores

- numberOfCores

The number of active cores

Required.