42 using namespace HDK_Sample;
79 COP2_SampleGenerator::COP2_SampleGenerator(
OP_Network *parent,
287 float *dest =
new float[tiles->
mySize];
292 seed = ((unsigned) data->
mySeed * 4 + ti)
297 for(i=0; i<tiles->mySize; i++)
298 dest[i] = SYSrandom(seed) * amp[ti];
315 "HDK Sample Generator",
void writeFPtoTile(TIL_TileList *tilelist, float *&src, int index)
void newCop2Operator(OP_OperatorTable *table)
TIL_Sequence * cookSequenceInfo(OP_ERROR &error) override
*}
OP_ERROR error() override
COP2_GENERATOR_SWITCHER(2,"HDK Sample Generator")
COP2_ContextData * newContextData(const TIL_Plane *, int, float t, int xres, int yres, int thread, int max_threads) override
Evaluate parms and stash data for cooking in a COP2_ContextData object.
#define FOR_EACH_UNCOOKED_TILE(list, tile, i)
#define OP_FLAG_GENERATOR
~COP2_SampleGenerator() override
static OP_VariablePair myVariablePair
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
Simple COP generator example for the HDK.
static OP_VariablePair myVariablePair
PRM_API const PRM_Type PRM_INT_J
static OP_TemplatePair myTemplatePair
PRM_API const PRM_Type PRM_RGB_J
Data class to hold parm values and data for COP2_SampleGenerator.
COP2_ContextData * data()
GLuint const GLchar * name
GLenum GLenum GLsizei void * table
PRM_API const PRM_Type PRM_SWITCHER
PRM_API PRM_Default PRMoneDefaults[]
PRM_API PRM_Name PRMswitcherName
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
static OP_TemplatePair myTemplatePair
constexpr SYS_FORCE_INLINE const T * data() const noexcept
static PRM_Template myTemplateList[]
OP_ERROR generateTile(COP2_Context &context, TIL_TileList *tilelist) override
Create the image data for a single tile list - multithreaded call.
TIL_Sequence * cookSequenceInfo(OP_ERROR &error) override