Max 5 API Reference
![]() |
Functions | |
long | jit_gl_report_error (char *prefix) |
Tests for OpenGL error and reports to Max window. | |
const char * | jit_gl_get_vendor () |
Retrieves OpenGL vendor string. | |
const char * | jit_gl_get_renderer () |
Retrieves OpenGL renderer string. | |
const char * | jit_gl_get_version () |
Retrieves OpenGL version string. | |
const char * | jit_gl_get_glu_version () |
Retrieves OpenGL GL Utilities version string. | |
const char * | jit_gl_get_extensions () |
Retrieves OpenGL extensions string. | |
char | jit_gl_is_min_version (int major, int minor, int release) |
Tests current OpenGL version to be greater than or equal to the version provided. | |
char | jit_gl_is_extension_supported (t_jit_gl_context ctx, const char *ext) |
Given a t_jit_gl_context pointer, checks to see if it suppports the provided extension. | |
t_jit_glchunk * | jit_glchunk_new (t_symbol *prim, int planes, int vertices, int indices) |
Allocates and initializes a t_jit_glchunk struct. | |
t_jit_glchunk * | jit_glchunk_grid_new (t_symbol *prim, int planes, int width, int height) |
Allocates and initializes a t_jit_glchunk struct with 2D grid matrix. | |
void | jit_glchunk_delete (t_jit_glchunk *x) |
Disposes t_jit_glchunk struct. | |
t_jit_err | jit_glchunk_copy (t_jit_glchunk **new, t_jit_glchunk *orig) |
Allocates t_jit_glchunk struct, and copies from t_jit_gl_struct provided. | |
t_jit_err | jit_gl_drawinfo_setup (void *x, t_jit_gl_drawinfo *drawinfo) |
Initializes t_jit_gl_drawinfo struct with the current context and ob3d. | |
long | jit_gl_drawinfo_active_textures (t_jit_gl_drawinfo *drawinfo) |
Determine the number of active texture units to use. | |
void | jit_gl_texcoord1f (t_jit_gl_drawinfo *drawinfo, float s) |
Set texture coordinate for all active texture units. | |
void | jit_gl_texcoord2f (t_jit_gl_drawinfo *drawinfo, float s, float t) |
Set texture coordinate for all active texture units. | |
void | jit_gl_texcoord3f (t_jit_gl_drawinfo *drawinfo, float s, float t, float r) |
Set texture coordinate for all active texture units. | |
void | jit_gl_texcoord1fv (t_jit_gl_drawinfo *drawinfo, float *v) |
Set texture coordinate for all active texture units. | |
void | jit_gl_texcoord2fv (t_jit_gl_drawinfo *drawinfo, float *v) |
Set texture coordinate for all active texture units. | |
void | jit_gl_texcoord3fv (t_jit_gl_drawinfo *drawinfo, float *v) |
Set texture coordinate for all active texture units. | |
void | jit_gl_bindtexture (t_jit_gl_drawinfo *drawinfo, t_symbol *s, long i) |
Bind texture for specified texture unit. | |
void | jit_gl_unbindtexture (t_jit_gl_drawinfo *drawinfo, t_symbol *s, long i) |
Unbind texture for specified texture unit. | |
void | jit_gl_begincapture (t_jit_gl_drawinfo *drawinfo, t_symbol *s, long i) |
Begin texture capture. | |
void | jit_gl_endcapture (t_jit_gl_drawinfo *drawinfo, t_symbol *s, long i) |
End texture capture. | |
void * | jit_ob3d_setup (void *jit_class, long oboffset, long flags) |
Adds default methods and attributes to the OB3D class. | |
void * | jit_ob3d_new (void *x, t_symbol *dest_name) |
Allocates and initializes OB3D resources. | |
void | jit_ob3d_free (void *jit_ob) |
Disposes OB3D resources. | |
t_jit_err | jit_ob3d_set_context (void *jit_ob) |
Sets the current Open GL context to the context referenced by the OB3D drawto attribute. | |
void * | ob3d_jitob_get (void *v) |
Retrieves parent Jitter object from opaque t_jit_ob3d struct. | |
long | ob3d_auto_get (void *v) |
Retrieves automatic flag from opaque t_jit_ob3d struct. | |
long | ob3d_enable_get (void *v) |
Retrieves enable flag from opaque t_jit_ob3d struct. | |
long | ob3d_ui_get (void *v) |
Retrieves UI flag from opaque t_jit_ob3d struct. | |
void * | ob3d_outlet_get (void *v) |
Retrieves matrix outlet from opaque t_jit_ob3d struct. | |
long | ob3d_dirty_get (void *v) |
Retrieves dirty flag from opaque t_jit_ob3d struct. | |
void | ob3d_dirty_set (void *v, long c) |
Sets dirty flag from opaque t_jit_ob3d struct. | |
void | ob3d_dest_dim_set (void *v, long width, long height) |
Sets destination dimensions in opaque t_jit_ob3d struct. | |
void | ob3d_dest_dim_get (void *v, long *width, long *height) |
Gets destination dimensions from opaque t_jit_ob3d struct. | |
void | ob3d_render_ptr_set (void *v, void *render_ptr) |
Sets renderer pointer in opaque t_jit_ob3d struct. | |
void * | ob3d_render_ptr_get (void *v) |
Gets renderer pointer from opaque t_jit_ob3d struct. | |
void | max_ob3d_setup (void) |
Adds default methods and OB3D Max wrapper class. | |
void | max_jit_ob3d_attach (void *x, t_jit_object *jit_ob, void *outlet) |
Allocates and initializes OB3D Max wrapper related resources. | |
void | max_jit_ob3d_detach (void *x) |
Disposes OB3D Max wrapper related resources. | |
t_jit_err | max_jit_ob3d_assist (void *x, void *b, long m, long a, char *s) |
Default OB3D Max wrapper assistance method. | |
void | max_ob3d_bang (t_max_object *x) |
Default OB3D Max wrapper bang method. | |
void | max_ob3d_notify (t_max_object *x, t_symbol *sender_name, t_symbol *msg, void *p_sender) |
Default OB3D Max wrapper notification method. | |
t_jit_err | jit_ob3d_draw_chunk (void *v, t_jit_glchunk *chunk) |
Draws one t_jit_glchunk If the OB3D is not in matrixoutput mode, the drawing call is made directly to the renderer. |
void jit_gl_begincapture | ( | t_jit_gl_drawinfo * | drawinfo, | |
t_symbol * | s, | |||
long | i | |||
) |
Begin texture capture.
drawinfo | t_jit_gl_drawinfo pointer | |
s | texture name | |
i | ignored |
Definition at line 331 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ob3d.
void jit_gl_bindtexture | ( | t_jit_gl_drawinfo * | drawinfo, | |
t_symbol * | s, | |||
long | i | |||
) |
Bind texture for specified texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
s | texture name | |
i | texture unit |
Definition at line 207 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ob3d.
long jit_gl_drawinfo_active_textures | ( | t_jit_gl_drawinfo * | drawinfo | ) |
Determine the number of active texture units to use.
drawinfo | t_jit_gl_drawinfo pointer |
Definition at line 58 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, and t_jit_gl_drawinfo::ob3d.
t_jit_err jit_gl_drawinfo_setup | ( | void * | x, | |
t_jit_gl_drawinfo * | drawinfo | |||
) |
Initializes t_jit_gl_drawinfo struct with the current context and ob3d.
x | Jitter object pointer | |
drawinfo | t_jit_gl_drawinfo pointer |
Definition at line 28 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, and t_jit_gl_drawinfo::ob3d.
void jit_gl_endcapture | ( | t_jit_gl_drawinfo * | drawinfo, | |
t_symbol * | s, | |||
long | i | |||
) |
End texture capture.
drawinfo | t_jit_gl_drawinfo pointer | |
s | texture name | |
i | ignored |
Definition at line 355 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ob3d.
const char* jit_gl_get_extensions | ( | ) |
const char* jit_gl_get_glu_version | ( | ) |
const char* jit_gl_get_renderer | ( | ) |
const char* jit_gl_get_vendor | ( | ) |
const char* jit_gl_get_version | ( | ) |
Retrieves OpenGL version string.
Equivalent to glGetString(GL_VERSION). Assumes a valid context has been set.
Definition at line 308 of file jit.gl.c.
Referenced by jit_gl_is_min_version().
char jit_gl_is_extension_supported | ( | t_jit_gl_context | ctx, | |
const char * | ext | |||
) |
Given a t_jit_gl_context pointer, checks to see if it suppports the provided extension.
Equivalent to testing for the substring within the string returned by glGetString(GL_EXTENSIONS).
ctx | t_jit_gl_context pointer | |
ext | extension string |
char jit_gl_is_min_version | ( | int | major, | |
int | minor, | |||
int | release | |||
) |
Tests current OpenGL version to be greater than or equal to the version provided.
Assumes a valid context has been set.
major | major version number | |
minor | minor version number | |
release | release version number |
Definition at line 354 of file jit.gl.c.
References jit_gl_get_version().
long jit_gl_report_error | ( | char * | prefix | ) |
void jit_gl_texcoord1f | ( | t_jit_gl_drawinfo * | drawinfo, | |
float | s | |||
) |
Set texture coordinate for all active texture units.
Equivalent to glMultiTexCoord1fARB for each active texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
s | s texture coordinate |
Definition at line 73 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, MIN, and t_jit_gl_drawinfo::ob3d.
void jit_gl_texcoord1fv | ( | t_jit_gl_drawinfo * | drawinfo, | |
float * | v | |||
) |
Set texture coordinate for all active texture units.
Equivalent to glMultiTexCoord1fvARB for each active texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
v | texture coordinate vector |
Definition at line 141 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, MIN, and t_jit_gl_drawinfo::ob3d.
void jit_gl_texcoord2f | ( | t_jit_gl_drawinfo * | drawinfo, | |
float | s, | |||
float | t | |||
) |
Set texture coordinate for all active texture units.
Equivalent to glMultiTexCoord2fARB for each active texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
s | s texture coordinate | |
t | t texture coordinate |
Definition at line 94 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, MIN, and t_jit_gl_drawinfo::ob3d.
void jit_gl_texcoord2fv | ( | t_jit_gl_drawinfo * | drawinfo, | |
float * | v | |||
) |
Set texture coordinate for all active texture units.
Equivalent to glMultiTexCoord2fvARB for each active texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
v | texture coordinate vector |
Definition at line 163 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, MIN, and t_jit_gl_drawinfo::ob3d.
void jit_gl_texcoord3f | ( | t_jit_gl_drawinfo * | drawinfo, | |
float | s, | |||
float | t, | |||
float | r | |||
) |
Set texture coordinate for all active texture units.
Equivalent to glMultiTexCoord3fARB for each active texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
s | s texture coordinate | |
t | t texture coordinate | |
r | r texture coordinate |
Definition at line 118 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, MIN, and t_jit_gl_drawinfo::ob3d.
void jit_gl_texcoord3fv | ( | t_jit_gl_drawinfo * | drawinfo, | |
float * | v | |||
) |
Set texture coordinate for all active texture units.
Equivalent to glMultiTexCoord3fvARB for each active texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
v | texture coordinate vector |
Definition at line 185 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ctx, MIN, and t_jit_gl_drawinfo::ob3d.
void jit_gl_unbindtexture | ( | t_jit_gl_drawinfo * | drawinfo, | |
t_symbol * | s, | |||
long | i | |||
) |
Unbind texture for specified texture unit.
drawinfo | t_jit_gl_drawinfo pointer | |
s | texture name | |
i | texture unit |
Definition at line 231 of file jit.gl.drawinfo.c.
References t_jit_gl_drawinfo::ob3d.
t_jit_err jit_glchunk_copy | ( | t_jit_glchunk ** | new, | |
t_jit_glchunk * | orig | |||
) |
Allocates t_jit_glchunk struct, and copies from t_jit_gl_struct provided.
new | pointer to new t_jit_glchunk pointer | |
orig | priginal t_jit_glchunk pointer |
Definition at line 151 of file jit.gl.chunk.c.
References jit_getbytes(), jit_glchunk_copy(), jit_glchunk_delete(), jit_object_method(), jit_object_new(), t_jit_glchunk::m_flags, t_jit_glchunk::m_index, t_jit_glchunk::m_index_name, t_jit_glchunk::m_vertex, t_jit_glchunk::m_vertex_name, t_jit_glchunk::next_chunk, and t_jit_glchunk::prim.
Referenced by jit_glchunk_copy().
void jit_glchunk_delete | ( | t_jit_glchunk * | x | ) |
Disposes t_jit_glchunk struct.
x | t_jit_glchunk pointer |
Definition at line 126 of file jit.gl.chunk.c.
References jit_freebytes(), jit_glchunk_delete(), jit_object_free(), t_jit_glchunk::m_index, t_jit_glchunk::m_vertex, and t_jit_glchunk::next_chunk.
Referenced by jit_glchunk_copy(), jit_glchunk_delete(), jit_glchunk_grid_new(), and jit_glchunk_new().
t_jit_glchunk* jit_glchunk_grid_new | ( | t_symbol * | prim, | |
int | planes, | |||
int | width, | |||
int | height | |||
) |
Allocates and initializes a t_jit_glchunk struct with 2D grid matrix.
prim | drawing primitive name | |
planes | number of planes to allocate in vertex matrix | |
width | width of vertex matrix to allocate | |
height | height of vertex matrix to allocate |
Definition at line 86 of file jit.gl.chunk.c.
References t_jit_matrix_info::dim, t_jit_matrix_info::dimcount, jit_getbytes(), jit_glchunk_delete(), jit_matrix_info_default(), jit_object_new(), t_jit_glchunk::m_flags, t_jit_glchunk::m_index, t_jit_glchunk::m_index_name, t_jit_glchunk::m_vertex, t_jit_glchunk::m_vertex_name, t_jit_glchunk::next_chunk, t_jit_matrix_info::planecount, t_jit_glchunk::prim, and t_jit_matrix_info::type.
t_jit_glchunk* jit_glchunk_new | ( | t_symbol * | prim, | |
int | planes, | |||
int | vertices, | |||
int | indices | |||
) |
Allocates and initializes a t_jit_glchunk struct.
prim | drawing primitive name | |
planes | number of planes to allocate in vertex matrix | |
vertices | number of vertices to allocate in vertex matrix | |
indices | number of indices to allocate in index matrix, if used |
Definition at line 32 of file jit.gl.chunk.c.
References t_jit_matrix_info::dim, t_jit_matrix_info::dimcount, jit_getbytes(), jit_glchunk_delete(), jit_matrix_info_default(), jit_object_new(), t_jit_glchunk::m_flags, t_jit_glchunk::m_index, t_jit_glchunk::m_index_name, t_jit_glchunk::m_vertex, t_jit_glchunk::m_vertex_name, t_jit_glchunk::next_chunk, t_jit_matrix_info::planecount, t_jit_glchunk::prim, and t_jit_matrix_info::type.
t_jit_err jit_ob3d_draw_chunk | ( | void * | v, | |
t_jit_glchunk * | chunk | |||
) |
Draws one t_jit_glchunk If the OB3D is not in matrixoutput mode, the drawing call is made directly to the renderer.
Otherwise, the chunk is sent out the OB3D's outlet as a message compatible with jit.gl.render.
v | t_jit_ob3d pointer | |
chunk | t_jit_glchunk pointer |
Definition at line 2743 of file jit.gl.ob3d.c.
References jit_atom_setlong(), jit_object_method(), and jit_object_notify().
void jit_ob3d_free | ( | void * | jit_ob | ) |
Disposes OB3D resources.
jit_ob | Jitter object pointer |
Definition at line 784 of file jit.gl.ob3d.c.
References jit_freebytes().
void* jit_ob3d_new | ( | void * | x, | |
t_symbol * | dest_name | |||
) |
Allocates and initializes OB3D resources.
x | Jitter object pointer | |
dest_name | drawing destination name |
Definition at line 653 of file jit.gl.ob3d.c.
References jit_atom_setsym(), jit_getbytes(), jit_object_getmethod(), and jit_object_method().
t_jit_err jit_ob3d_set_context | ( | void * | jit_ob | ) |
Sets the current Open GL context to the context referenced by the OB3D drawto attribute.
jit_ob | Jitter object pointer |
Definition at line 814 of file jit.gl.ob3d.c.
References jit_object_method().
void* jit_ob3d_setup | ( | void * | jit_class, | |
long | oboffset, | |||
long | flags | |||
) |
Adds default methods and attributes to the OB3D class.
jit_class | Jitter class pointer | |
oboffset | object struct byte offset for t_jit_ob3d pointer | |
flags | flags to override default OB3D behavior |
Definition at line 66 of file jit.gl.ob3d.c.
References A_CANT, A_DEFER_LOW, calcoffset, gensym(), JIT_ATTR_GET_DEFER_LOW, JIT_ATTR_SET_USURP_LOW, jit_class_addattr(), jit_class_addmethod(), jit_getbytes(), JIT_OB3D_AUTO_ONLY, JIT_OB3D_HAS_CAMERA, JIT_OB3D_HAS_LIGHTS, JIT_OB3D_IS_RENDERER, JIT_OB3D_IS_SLAB, JIT_OB3D_NO_ANTIALIAS, JIT_OB3D_NO_BLEND, JIT_OB3D_NO_COLOR, JIT_OB3D_NO_DEPTH, JIT_OB3D_NO_FOG, JIT_OB3D_NO_LIGHTING_MATERIAL, JIT_OB3D_NO_MATRIXOUTPUT, JIT_OB3D_NO_POLY_VARS, JIT_OB3D_NO_ROTATION_SCALE, JIT_OB3D_NO_TEXTURE, and jit_object_new().
t_jit_err max_jit_ob3d_assist | ( | void * | x, | |
void * | b, | |||
long | m, | |||
long | a, | |||
char * | s | |||
) |
Default OB3D Max wrapper assistance method.
x | Max object pointer | |
b | ignored | |
m | inlet or outlet type | |
a | index | |
s | output string |
Definition at line 1130 of file jit.gl.ob3d.c.
void max_jit_ob3d_attach | ( | void * | x, | |
t_jit_object * | jit_ob, | |||
void * | outlet | |||
) |
Allocates and initializes OB3D Max wrapper related resources.
x | Max wrapper object pointer | |
jit_ob | Jitter object pointer | |
outlet | matrix outlet pointer |
Definition at line 1070 of file jit.gl.ob3d.c.
References jit_attr_getsym(), jit_object_attach(), and jit_object_method().
void max_jit_ob3d_detach | ( | void * | x | ) |
Disposes OB3D Max wrapper related resources.
x | Max wrapper object pointer |
Definition at line 1105 of file jit.gl.ob3d.c.
References jit_attr_getsym(), jit_object_detach(), and max_jit_obex_jitob_get().
void max_ob3d_bang | ( | t_max_object * | x | ) |
Default OB3D Max wrapper bang method.
x | Max object pointer |
Definition at line 1216 of file jit.gl.ob3d.c.
References typedmess().
Referenced by max_ob3d_setup().
void max_ob3d_notify | ( | t_max_object * | x, | |
t_symbol * | sender_name, | |||
t_symbol * | msg, | |||
void * | p_sender | |||
) |
Default OB3D Max wrapper notification method.
x | Max object pointer | |
sender_name | sender's object name | |
msg | notification message | |
p_sender | sender's object pointer |
Definition at line 1299 of file jit.gl.ob3d.c.
References jit_object_method().
Referenced by max_ob3d_setup().
long ob3d_auto_get | ( | void * | v | ) |
Retrieves automatic flag from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer |
Definition at line 868 of file jit.gl.ob3d.c.
void ob3d_dest_dim_get | ( | void * | v, | |
long * | width, | |||
long * | height | |||
) |
Gets destination dimensions from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer | |
width | destination dimensions width pointer | |
height | destination dimensions height pointer |
Definition at line 998 of file jit.gl.ob3d.c.
void ob3d_dest_dim_set | ( | void * | v, | |
long | width, | |||
long | height | |||
) |
Sets destination dimensions in opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer | |
width | destination dimensions width | |
height | destination dimensions height |
Definition at line 979 of file jit.gl.ob3d.c.
long ob3d_dirty_get | ( | void * | v | ) |
Retrieves dirty flag from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer |
Definition at line 944 of file jit.gl.ob3d.c.
void ob3d_dirty_set | ( | void * | v, | |
long | c | |||
) |
Sets dirty flag from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer | |
c | dirty flag state |
Definition at line 962 of file jit.gl.ob3d.c.
long ob3d_enable_get | ( | void * | v | ) |
Retrieves enable flag from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer |
Definition at line 887 of file jit.gl.ob3d.c.
void* ob3d_jitob_get | ( | void * | v | ) |
Retrieves parent Jitter object from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer |
Definition at line 840 of file jit.gl.ob3d.c.
void* ob3d_outlet_get | ( | void * | v | ) |
Retrieves matrix outlet from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer |
Definition at line 925 of file jit.gl.ob3d.c.
void* ob3d_render_ptr_get | ( | void * | v | ) |
Gets renderer pointer from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer |
Definition at line 1036 of file jit.gl.ob3d.c.
void ob3d_render_ptr_set | ( | void * | v, | |
void * | render_ptr | |||
) |
Sets renderer pointer in opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer | |
render_ptr | renderer pointer |
Definition at line 1019 of file jit.gl.ob3d.c.
long ob3d_ui_get | ( | void * | v | ) |
Retrieves UI flag from opaque t_jit_ob3d struct.
v | t_jit_ob3d pointer |
Definition at line 906 of file jit.gl.ob3d.c.