#include <VEX_VexOp.h>
Public Member Functions | |
| VEX_VexOp (const char *signature, VEX_VexOpCallback evaluator, int ctx_mask=(VEX_ALL_CONTEXT), VEX_VexOpInit init=0, VEX_VexOpCleanup cleanup=0, int optimize_level=VEX_OPTIMIZE_2, bool force_return_code=false) | |
| ~VEX_VexOp () | |
| Standard destructor. | |
| void | setCompleted (VEX_VexOpCompleted cback) |
| const char * | getSignature () const |
| Query the signature. | |
| int | getContextMask () const |
| Query the context mask. | |
| VEX_VexOpInit | getInit () const |
| Query the initialization function. | |
| VEX_VexOpCallback | getEvaluator () const |
| Query the evaluation function. | |
| VEX_VexOpCleanup | getCleanup () const |
| Query the cleanup function. | |
| VEX_VexOpCompleted | getCompleted () const |
| Query the completed function. | |
| int | getOptimizer () const |
| Query the optimization level. | |
Static Public Member Functions | |
| static const char * | stringAlloc (const char *str) |
| static void | stringFree (const char *str) |
| Function to free an allocated string. | |
| static int | getNumVexOps () |
| static const VEX_VexOp * | getVexOp (int idx) |
| Query the Nth function. | |
| static const char * | getVexOpLocation (int idx) |
| Get the path to the DSO associated with the VEX plug-in. | |
Protected Attributes | |
| char * | mySignature |
| VEX_VexOpInit | myInit |
| VEX_VexOpCallback | myEvaluator |
| VEX_VexOpCleanup | myCleanup |
| VEX_VexOpCompleted | myCompleted |
| int | myContextMask |
| int | myOptimizeLevel |
| unsigned int | myFlags |
Definition at line 135 of file VEX_VexOp.h.
| VEX_VexOp::VEX_VexOp | ( | const char * | signature, | |
| VEX_VexOpCallback | evaluator, | |||
| int | ctx_mask = (VEX_ALL_CONTEXT), |
|||
| VEX_VexOpInit | init = 0, |
|||
| VEX_VexOpCleanup | cleanup = 0, |
|||
| int | optimize_level = VEX_OPTIMIZE_2, |
|||
| bool | force_return_code = false | |||
| ) |
Function declaration
| signature | The function name and parameters expected | |
| evaluator | The evaluation callback | |
| ctx_mask | Which contexts this function is available in | |
| init | Initialization callback (called for every instance) | |
| cleanup | Cleanup callback | |
| 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 | ( | ) |
Standard destructor.
| VEX_VexOpCleanup VEX_VexOp::getCleanup | ( | ) | const [inline] |
| VEX_VexOpCompleted VEX_VexOp::getCompleted | ( | ) | const [inline] |
| int VEX_VexOp::getContextMask | ( | ) | const [inline] |
| VEX_VexOpCallback VEX_VexOp::getEvaluator | ( | ) | const [inline] |
| VEX_VexOpInit VEX_VexOp::getInit | ( | ) | const [inline] |
| static int VEX_VexOp::getNumVexOps | ( | ) | [static] |
These functions can be used to query the number of DSO's loaded by VEX and the locations of the shadered objects loaded.
| int VEX_VexOp::getOptimizer | ( | ) | const [inline] |
| const char* VEX_VexOp::getSignature | ( | ) | const [inline] |
| static const VEX_VexOp* VEX_VexOp::getVexOp | ( | int | idx | ) | [static] |
Query the Nth function.
| static const char* VEX_VexOp::getVexOpLocation | ( | int | idx | ) | [static] |
Get the path to the DSO associated with the VEX plug-in.
| void VEX_VexOp::setCompleted | ( | VEX_VexOpCompleted | cback | ) | [inline] |
Set the completed callback, called when all evaluate calls for a given shader invokation are finished.
Definition at line 161 of file VEX_VexOp.h.
| static const char* VEX_VexOp::stringAlloc | ( | const char * | str | ) | [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:
void vexStrCat(int argc, void *argv[], void *) { // arg[0] = result, arg[1..2] == strings to concat char work_buf[256]; VEX_VexOp::stringFree((char *)argv[0]); strcpy(work_buf, (char *)argv[1]); strcat(work_buf, (char *)argv[2]); argv[0] = VEX_VexOp::stringAlloc(work_buf); }
| static void VEX_VexOp::stringFree | ( | const char * | str | ) | [static] |
Function to free an allocated string.
VEX_VexOpCleanup VEX_VexOp::myCleanup [protected] |
Definition at line 224 of file VEX_VexOp.h.
VEX_VexOpCompleted VEX_VexOp::myCompleted [protected] |
Definition at line 225 of file VEX_VexOp.h.
int VEX_VexOp::myContextMask [protected] |
Definition at line 229 of file VEX_VexOp.h.
VEX_VexOpCallback VEX_VexOp::myEvaluator [protected] |
Definition at line 223 of file VEX_VexOp.h.
unsigned int VEX_VexOp::myFlags [protected] |
Definition at line 231 of file VEX_VexOp.h.
VEX_VexOpInit VEX_VexOp::myInit [protected] |
Definition at line 222 of file VEX_VexOp.h.
int VEX_VexOp::myOptimizeLevel [protected] |
Definition at line 230 of file VEX_VexOp.h.
char* VEX_VexOp::mySignature [protected] |
Definition at line 219 of file VEX_VexOp.h.
1.5.9