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; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.scope3D~", (method)hoa_scope_new, (method)hoa_scope_free, (long)sizeof(t_hoa_scope), 0L, A_GIMME, 0); class_addmethod(c, (method)hoa_scope_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_scope_assist, "assist", A_CANT, 0); class_dspinit(c); class_register(CLASS_BOX, c); hoa_scope_class = c; hoa_credit(); return 0; }