HDK
|
Use this class to extend VEX by adding custom VEX functions. More...
#include <VEX_VexOp.h>
Public Member Functions | |
template<VEX_Precision PREC> | |
void | setCompleted (VEX_VexOpCompleted cback) |
const UT_StringHolder & | getSignature () const |
Query the signature. More... | |
int | getContextMask () const |
Query the context mask. More... | |
template<VEX_Precision PREC> | |
VEX_VexOpInit | getInit () const |
Query the initialization function. More... | |
template<VEX_Precision PREC> | |
VEX_VexOpCallback | getEvaluator () const |
Query the evaluation function. More... | |
template<VEX_Precision PREC> | |
VEX_VexOpTypedCallback | getTypedEvaluator () const |
Query the typed evaluation function. More... | |
template<VEX_Precision PREC> | |
VEX_VexOpCleanup | getCleanup () const |
Query the cleanup function. More... | |
template<VEX_Precision PREC> | |
VEX_VexOpCompleted | getCompleted () const |
Query the completed function. More... | |
int | getOptimizer () const |
Query the optimization level. More... | |
template<> | |
void | setCompleted (VEX_VexOpCompleted callback) |
template<> | |
VEX_VexOpInit | getInit () const |
template<> | |
VEX_VexOpCallback | getEvaluator () const |
template<> | |
VEX_VexOpTypedCallback | getTypedEvaluator () const |
template<> | |
VEX_VexOpCleanup | getCleanup () const |
template<> | |
VEX_VexOpCleanup | getCompleted () const |
template<> | |
void | setCompleted (VEX_VexOpCompleted callback) |
template<> | |
VEX_VexOpInit | getInit () const |
template<> | |
VEX_VexOpCallback | getEvaluator () const |
template<> | |
VEX_VexOpTypedCallback | getTypedEvaluator () const |
template<> | |
VEX_VexOpCleanup | getCleanup () const |
template<> | |
VEX_VexOpCleanup | getCompleted () const |
VEX_VexOp (const UT_StringHolder &signature, VEX_VexOpCallback evaluator32, int ctx_mask=(VEX_ALL_CONTEXT), VEX_VexOpInit init32=0, VEX_VexOpCleanup cleanup32=0, int optimize_level=VEX_OPTIMIZE_2, bool force_return_code=false) | |
VEX_VexOp (const UT_StringHolder &signature, VEX_VexOpCallback evaluator32, VEX_VexOpCallback evaluator64, int ctx_mask=(VEX_ALL_CONTEXT), VEX_VexOpInit init32=0, VEX_VexOpInit init64=0, VEX_VexOpCleanup cleanup32=0, VEX_VexOpCleanup cleanup64=0, int optimize_level=VEX_OPTIMIZE_2, bool force_return_code=false) | |
VEX_VexOp (const UT_StringHolder &signature, VEX_VexOpTypedCallback evaluator32, int ctx_mask=(VEX_ALL_CONTEXT), VEX_VexOpInit init32=0, VEX_VexOpCleanup cleanup32=0, int optimize_level=VEX_OPTIMIZE_2, bool force_return_code=false) | |
VEX_VexOp (const UT_StringHolder &signature, VEX_VexOpTypedCallback evaluator32, VEX_VexOpTypedCallback evaluator64, int ctx_mask=(VEX_ALL_CONTEXT), VEX_VexOpInit init32=0, VEX_VexOpInit init64=0, VEX_VexOpCleanup cleanup32=0, VEX_VexOpCleanup cleanup64=0, int optimize_level=VEX_OPTIMIZE_2, bool force_return_code=false) | |
Static Public Member Functions | |
static const char * | stringAlloc (const char *str) |
static void | stringFree (const char *str) |
Function to free an allocated string. More... | |
static VEX_ErrorLog & | getErrorLog () |
static int | getNumVexOps () |
static const VEX_VexOp * | getVexOp (int idx) |
Query the Nth function. More... | |
static const char * | getVexOpLocation (int idx) |
Get the path to the DSO associated with the VEX plug-in. More... | |
Use this class to extend VEX by adding custom VEX functions.
Definition at line 150 of file VEX_VexOp.h.
VEX_VexOp::VEX_VexOp | ( | const UT_StringHolder & | signature, |
VEX_VexOpCallback | evaluator32, | ||
int | ctx_mask = (VEX_ALL_CONTEXT) , |
||
VEX_VexOpInit | init32 = 0 , |
||
VEX_VexOpCleanup | cleanup32 = 0 , |
||
int | optimize_level = VEX_OPTIMIZE_2 , |
||
bool | force_return_code = false |
||
) |
Function declaration
signature | The function name and parameters expected |
evaluator32 | The evaluation callback (32 bit) |
evaluator64 | The evaluation callback (64 bit) |
ctx_mask | Which contexts this function is available in |
init32 | Initialization callback (called for every 32 bit instance) |
init64 | Initialization callback (called for every 64 bit instance) |
cleanup32 | Cleanup callback (32 bit) |
cleanup64 | Cleanup callback (64 bit) |
optimize_level | Optimization level |
force_return_code | For signatures which have multiple write-only variables, this bool forces the first write-only variable to be interpreted as a return code. |
VEX_VexOp::VEX_VexOp | ( | const UT_StringHolder & | signature, |
VEX_VexOpCallback | evaluator32, | ||
VEX_VexOpCallback | evaluator64, | ||
int | ctx_mask = (VEX_ALL_CONTEXT) , |
||
VEX_VexOpInit | init32 = 0 , |
||
VEX_VexOpInit | init64 = 0 , |
||
VEX_VexOpCleanup | cleanup32 = 0 , |
||
VEX_VexOpCleanup | cleanup64 = 0 , |
||
int | optimize_level = VEX_OPTIMIZE_2 , |
||
bool | force_return_code = false |
||
) |
Function declaration
signature | The function name and parameters expected |
evaluator32 | The evaluation callback (32 bit) |
evaluator64 | The evaluation callback (64 bit) |
ctx_mask | Which contexts this function is available in |
init32 | Initialization callback (called for every 32 bit instance) |
init64 | Initialization callback (called for every 64 bit instance) |
cleanup32 | Cleanup callback (32 bit) |
cleanup64 | Cleanup callback (64 bit) |
optimize_level | Optimization level |
force_return_code | For signatures which have multiple write-only variables, this bool forces the first write-only variable to be interpreted as a return code. |
VEX_VexOp::VEX_VexOp | ( | const UT_StringHolder & | signature, |
VEX_VexOpTypedCallback | evaluator32, | ||
int | ctx_mask = (VEX_ALL_CONTEXT) , |
||
VEX_VexOpInit | init32 = 0 , |
||
VEX_VexOpCleanup | cleanup32 = 0 , |
||
int | optimize_level = VEX_OPTIMIZE_2 , |
||
bool | force_return_code = false |
||
) |
Function declaration
signature | The function name and parameters expected |
evaluator32 | The evaluation callback (32 bit) |
evaluator64 | The evaluation callback (64 bit) |
ctx_mask | Which contexts this function is available in |
init32 | Initialization callback (called for every 32 bit instance) |
init64 | Initialization callback (called for every 64 bit instance) |
cleanup32 | Cleanup callback (32 bit) |
cleanup64 | Cleanup callback (64 bit) |
optimize_level | Optimization level |
force_return_code | For signatures which have multiple write-only variables, this bool forces the first write-only variable to be interpreted as a return code. |
VEX_VexOp::VEX_VexOp | ( | const UT_StringHolder & | signature, |
VEX_VexOpTypedCallback | evaluator32, | ||
VEX_VexOpTypedCallback | evaluator64, | ||
int | ctx_mask = (VEX_ALL_CONTEXT) , |
||
VEX_VexOpInit | init32 = 0 , |
||
VEX_VexOpInit | init64 = 0 , |
||
VEX_VexOpCleanup | cleanup32 = 0 , |
||
VEX_VexOpCleanup | cleanup64 = 0 , |
||
int | optimize_level = VEX_OPTIMIZE_2 , |
||
bool | force_return_code = false |
||
) |
Function declaration
signature | The function name and parameters expected |
evaluator32 | The evaluation callback (32 bit) |
evaluator64 | The evaluation callback (64 bit) |
ctx_mask | Which contexts this function is available in |
init32 | Initialization callback (called for every 32 bit instance) |
init64 | Initialization callback (called for every 64 bit instance) |
cleanup32 | Cleanup callback (32 bit) |
cleanup64 | Cleanup callback (64 bit) |
optimize_level | Optimization level |
force_return_code | For signatures which have multiple write-only variables, this bool forces the first write-only variable to be interpreted as a return code. |
VEX_VexOpCleanup VEX_VexOp::getCleanup | ( | ) | const |
Query the cleanup function.
|
inline |
Definition at line 333 of file VEX_VexOp.h.
|
inline |
Definition at line 352 of file VEX_VexOp.h.
VEX_VexOpCompleted VEX_VexOp::getCompleted | ( | ) | const |
Query the completed function.
|
inline |
Definition at line 336 of file VEX_VexOp.h.
|
inline |
Definition at line 355 of file VEX_VexOp.h.
|
inline |
Query the context mask.
Definition at line 213 of file VEX_VexOp.h.
|
static |
During execution of a callback, this method can be used to retrieve the current VEX error log for error reporting. This method will only operate correctly in the thread that executed the callback.
VEX_VexOpCallback VEX_VexOp::getEvaluator | ( | ) | const |
Query the evaluation function.
|
inline |
Definition at line 327 of file VEX_VexOp.h.
|
inline |
Definition at line 346 of file VEX_VexOp.h.
VEX_VexOpInit VEX_VexOp::getInit | ( | ) | const |
Query the initialization function.
|
inline |
Definition at line 324 of file VEX_VexOp.h.
|
inline |
Definition at line 343 of file VEX_VexOp.h.
|
static |
These functions can be used to query the number of DSO's loaded by VEX and the locations of the shared objects loaded.
|
inline |
Query the optimization level.
Definition at line 230 of file VEX_VexOp.h.
|
inline |
Query the signature.
Definition at line 211 of file VEX_VexOp.h.
VEX_VexOpTypedCallback VEX_VexOp::getTypedEvaluator | ( | ) | const |
Query the typed evaluation function.
|
inline |
Definition at line 330 of file VEX_VexOp.h.
|
inline |
Definition at line 349 of file VEX_VexOp.h.
|
static |
Get the path to the DSO associated with the VEX plug-in.
void VEX_VexOp::setCompleted | ( | VEX_VexOpCompleted | cback | ) |
Set the completed callback, called when all evaluate calls for a given shader invokation are finished.
|
inline |
Definition at line 321 of file VEX_VexOp.h.
|
inline |
Definition at line 340 of file VEX_VexOp.h.
|
static |
When dealing assigning to string arguments, you must "free" the previous string value by calling "stringFree". You must set the resulting string to the return code from "stringAlloc". If you do your own memory management (i.e. calling strdup() or setting strings to constant values), you will most likely crash VEX. For example:
|
static |
Function to free an allocated string.
|
protected |
Definition at line 283 of file VEX_VexOp.h.
|
protected |
Definition at line 289 of file VEX_VexOp.h.
|
protected |
Definition at line 284 of file VEX_VexOp.h.
|
protected |
Definition at line 290 of file VEX_VexOp.h.
|
protected |
Definition at line 294 of file VEX_VexOp.h.
|
protected |
Definition at line 281 of file VEX_VexOp.h.
|
protected |
Definition at line 287 of file VEX_VexOp.h.
|
protected |
Definition at line 296 of file VEX_VexOp.h.
|
protected |
Definition at line 280 of file VEX_VexOp.h.
|
protected |
Definition at line 286 of file VEX_VexOp.h.
|
protected |
Definition at line 295 of file VEX_VexOp.h.
|
protected |
Definition at line 277 of file VEX_VexOp.h.
|
protected |
Definition at line 282 of file VEX_VexOp.h.
|
protected |
Definition at line 288 of file VEX_VexOp.h.