objects below you in the chain have finished. // You should reset all GEM/OpenGL states here. // If you care about the start of rendering // If you care about the stop of rendering // has rendering started ? // If anything in the object has changed // check whether this object has changed // The outlet // this gets called in the before the startRendering() routine // if it returns TRUE, the object's startRendering(), render() and stopRendering() functions will be called // it it returns FALSE, the object will be disabled // when rendering is restarted, this function get's called again // the default is to enable rendering // this function is important if you want to disable an object because it cannot be used (e.g. missing driver support) // creation callback /* whether the object is internally disabled or not * objects are to be disabled, if the system cannot make use of them, e.g. because of unsupported openGL features
TexCoord { public: TexCoord() : s(0.f), t(0.f) { } TexCoord(float s_, float t_) : s(s_), t(t_) { } float s; float t; }; struct GEM_EXTERN pixBlock { pixBlock(); ////////// // the block's image imageStruct image; ////////// // is this a newimage since last time? // ie, has it been refreshed int newimage; ////////// // keeps track of when new films are loaded // useful for rectangle_textures on OSX int newfilm; };
inlet_new(this->x_obj, &this->x_obj->ob_pd, gensym("list"), gensym("vert_pos")); Bikin inlet di object (INIT) berurutan, inlet otomatis geser 2. inlet_new(this->x_obj, &this->x_obj->ob_pd, gensym("list"), gensym("vert_size")); Fungsi Callback Diarahkan lewat obj_setupCallback(t_class *classPtr) Menerima List Pengenal (utk callback) Inisialisasi Callback FUNGSI CALLBACK
PixUtil UTILITY: GEM_EXTERN extern void copy2Image(imageStruct *to, imageStruct *from); // assumes that it only has to refresh the data GEM_EXTERN extern void refreshImage(imageStruct *to, imageStruct *from); struct GEM_EXTERN pixBlock { pixBlock(); ////////// // the block's image imageStruct image; ////////// // is this a newimage since last time? // ie, has it been refreshed int newimage; ////////// // keeps track of when new films are loaded // useful for rectangle_textures on OSX int newfilm; }; unsigned char *data; // the pointer to the data