int C74_EXPORT main(void) { t_class *maxclass, *jitclass; // initialize our Jitter class hoa_gl_scope_init(); // create our Max class maxclass = class_new("hoa.gl.scope3D~", (method)max_hoa_gl_scope_new, (method)max_hoa_gl_scope_free, sizeof(t_max_hoa_gl_scope), NULL, A_GIMME, 0); // specify a byte offset to keep additional information about our object max_jit_class_obex_setup(maxclass, calcoffset(t_max_hoa_gl_scope, obex)); // look up our Jitter class in the class registry jitclass = (t_class*) jit_class_findbyname(gensym("hoa_gl_scope")); // wrap our Jitter class with the standard methods for Jitter objects max_jit_class_wrap_standard(maxclass, jitclass, 0); // use standard ob3d assist method //class_addmethod(maxclass, (method)max_jit_ob3d_assist, "assist", A_CANT, 0); class_addmethod(maxclass, (method)hoa_gl_scope_dsp64, "dsp64", A_CANT, 0); class_addmethod(maxclass, (method)hoa_gl_scope_assist, "assist", A_CANT, 0); // add methods for 3d drawing max_jit_class_ob3d_wrap(maxclass); class_dspinit(maxclass); class_register(CLASS_BOX, maxclass); max_hoa_gl_scope_class = maxclass; hoa_credit(); return 0; }
// MAX 7 void ext_main(void *r) { /* // MAX 6 int C74_EXPORT main(void) { */ t_class *maxclass, *jitclass; #ifdef ENV64BIT post("jit_gl_spout_sender - Vers 2.0.6.0 (64 bit)"); #else post("jit_gl_spout_sender - Vers 2.0.6.0 (32 bit)"); #endif // initialize our Jitter class jit_gl_spoutsender_init(); // create our Max class maxclass = class_new("jit.gl.spoutsender", (method)max_jit_gl_spoutsender_new, (method)max_jit_gl_spoutsender_free, sizeof(t_max_jit_gl_spoutsender), NULL, A_GIMME, 0); // specify a byte offset to keep additional information about our object max_jit_class_obex_setup(maxclass, calcoffset(t_max_jit_gl_spoutsender, obex)); // look up our Jitter class in the class registry jitclass = (t_class *)jit_class_findbyname(gensym("jit_gl_spoutsender")); // wrap our Jitter class with the standard methods for Jitter objects max_jit_class_wrap_standard(maxclass, jitclass, 0); // use standard ob3d assist method class_addmethod(maxclass, (method)max_jit_ob3d_assist, "assist", A_CANT, 0); // add methods for 3d drawing max_jit_class_ob3d_wrap(maxclass); // register our class with max class_register(CLASS_BOX, maxclass); max_jit_gl_spoutsender_class = maxclass; }
// MAX 7 void ext_main(void *r) { UNREFERENCED_PARAMETER(r); t_class *maxclass, *jitclass; /* // Debug console window so printf works FILE* pCout; // should really be freed on exit AllocConsole(); freopen_s(&pCout, "CONOUT$", "w", stdout); printf("jit_gl_spout_receiver - Vers 2.0.6.0\n"); */ // Show the version for reference #ifdef ENV64BIT post("jit_gl_spout_receiver - Vers 2.0.6.0 (64 bit)"); #else post("jit_gl_spout_receiver - Vers 2.0.6.0 (32 bit)"); #endif // initialize our Jitter class jit_gl_spout_receiver_init(); // create our Max class maxclass = class_new("jit.gl.spoutreceiver", (method)max_jit_gl_spout_receiver_new, (method)max_jit_gl_spout_receiver_free, sizeof(t_max_jit_gl_spout_receiver), NULL, A_GIMME, 0); // specify a byte offset to keep additional information about our object max_jit_class_obex_setup(maxclass, calcoffset(t_max_jit_gl_spout_receiver, obex)); // look up our Jitter class in the class registry jitclass = (t_class *)jit_class_findbyname(gensym("jit_gl_spout_receiver")); // wrap our Jitter class with the standard methods for Jitter objects max_jit_class_wrap_standard(maxclass, jitclass, 0); // custom draw handler so we can output our texture. // override default ob3d bang/draw methods class_addmethod(maxclass, (method)max_jit_gl_spout_receiver_bang, "bang", 0); // TODO - necessary ? class_addmethod(maxclass, (method)max_jit_gl_spout_receiver_draw, "draw", 0); class_addmethod(maxclass, (method)max_jit_gl_spout_receiver_getavailablesenders, "getavailablesenders", 0); // use standard ob3d assist method class_addmethod(maxclass, (method)max_jit_ob3d_assist, "assist", A_CANT, 0); // add methods for 3d drawing max_jit_class_ob3d_wrap(maxclass); ps_out_texture = gensym("jit_gl_texture"); ps_maxdraw = gensym("maxdraw"); ps_out_name = gensym("out_name"); ps_spoutsendername = gensym("SpoutSender"); ps_clear = gensym("clear"); // register our class with max class_register(CLASS_BOX, maxclass); max_jit_gl_spout_receiver_class = maxclass; }