Max 5 API Reference
00001 #ifndef JIT_GL_TEXTURE_H 00002 #define JIT_GL_TEXTURE_H 00003 00004 /* 00005 * Copyright 2001-2005 - Cycling '74 00006 * Derek Gerstmann - derek@cycling74.com 00007 * 00008 * Generic object for creating an OpenGL texture from a matrix. 00009 * 00010 */ 00011 00012 /*************************************************************************/ 00013 00014 #include "jit.common.h" 00015 #include "jit.half.h" 00016 #include "jit.bin.h" 00017 #include "ext_obex.h" 00018 #include "jit.gl.h" 00019 #include "jit.gl.support.h" 00020 #include "jit.gl.pbo.h" 00021 #include "jit.gl.pbuffer.h" 00022 00023 /*************************************************************************/ 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 #if C74_PRAGMA_STRUCT_PACKPUSH 00030 #pragma pack(push, 2) 00031 #elif C74_PRAGMA_STRUCT_PACK 00032 #pragma pack(2) 00033 #endif 00034 00035 /****************************************************************************/ 00036 00037 #define JIT_GL_TEXTURE_CAPTURE_DISABLED (0) 00038 #define JIT_GL_TEXTURE_CAPTURE_SETUP (1) 00039 #define JIT_GL_TEXTURE_CAPTURE_RESULT (2) 00040 #define JIT_GL_TEXTURE_CAPTURE_READBACK (3) 00041 00042 #define JIT_GL_TEXTURE_DEFAULT_WIDTH (256) 00043 #define JIT_GL_TEXTURE_DEFAULT_HEIGHT (256) 00044 00045 // pbo helper macro 00046 #define JIT_BUFFER_OFFSET(i) ((char *)NULL + (i)) 00047 00048 // symbol helper macros 00049 #define JIT_SYM_IF(x) ((x) && (x) != _jit_sym_nothing && (x)->s_name) 00050 #define JIT_SYM_SAFECSTR(x) ((JIT_SYM_IF(x)) ? (x)->s_name : "<null>" ) 00051 00052 #define MAX_TEXTURE_UNITS 32 00053 00054 // uyvy 00055 #ifdef WIN_VERSION 00056 #define JIT_GL_TEXTURE_UYVY_PLANECOUNT 3 00057 #define JIT_GL_TEXTURE_UYVY_WIDTH_SCALE 2 00058 #else 00059 #define JIT_GL_TEXTURE_UYVY_PLANECOUNT 4 00060 #define JIT_GL_TEXTURE_UYVY_WIDTH_SCALE 1 00061 #endif 00062 00063 /*************************************************************************/ 00064 00065 typedef struct _jit_gl_texture 00066 { 00067 t_object ob; // texture object 00068 void *ob3d; // object 3d 00069 long dim[3]; // user texture dimensions (input matrix dim used for default) 00070 t_symbol *file; // filename of texture to load 00071 t_symbol *type; // name of desired pixel data type (char, long, half, float) 00072 t_symbol *colormode; // name of desired pixel format 00073 t_symbol *compress; // type of compression to use 00074 t_symbol *mode; // cache mode (static/dynamic) 00075 t_symbol *hint; // texture hint (cached/private/shared) 00076 t_jit_object *matrix; // cached matrix object 00077 t_jit_object *uyvy2argb; // uyvy2argb object (if used) 00078 t_symbol *apply; // apply mode 00079 t_symbol *correction; // correction hint 00080 t_symbol *wrap[3]; // 0 - T, 1 - S, 2 - R 00081 t_symbol *filter; // base filtering mode 00082 t_symbol *mipmap; // mipmap filtering mode 00083 t_symbol *texgen; // texcoord generation mode 00084 t_symbol *function[2]; // combine function: 0 - RGB, 1 - ALPHA 00085 t_symbol *source[6]; // combine sources: 0,2,4 - RGB, 1,3,5 - ALPHA 00086 t_symbol *operand[6]; // combine operands: 0,2,4 - RGB, 1,3,5 - ALPHA 00087 long weight[2]; // combine weights: 0 - RGB, 1 - ALPHA 00088 long offset[3]; // texel dim offsets for drawing 00089 float blendcolor[4]; // combine blend color: RGBA 00090 float bordercolor[4]; // border color: RGBA 00091 long border; // flag for enabling border 00092 long anisotropy; // ANISOTROPY_1 -> ANISOTROPY_16 00093 long target; // binding target 00094 GLenum datatype; // UNSIGNED_BYTE, etc 00095 long datasize; // size of datatype 00096 GLenum format; // opengl texture format 00097 GLenum internal; // opengl texture internal format 00098 long adapt; // adapt to incoming dimensions 00099 long width; // x dim 00100 long height; // y dim 00101 long depth; // z dim 00102 float priority; // priority 00103 long rectangle; // enable rectangular texture support 00104 t_symbol *defaultimage; // default image (currently checker, but optionally black) 00105 long debug; // enable debug quad drawing 00106 long flip; // flag to correct for OpenGL lower-left origin 00107 long autoscale; // enable auto scaling for rectangular texture support 00108 long update; // update flag (needs to rebuild texture) 00109 long recreate; // recreate using existing matrix 00110 long reuse; // resuse existing texture data 00111 long destroy; // destroy flag 00112 long id; // id 00113 long flags; // internal flags for texture state 00114 long texsize; // size of texture data in bytes 00115 char *pixels; // pixel data 00116 long pixelcount; // number of pixels (L/A/BG/RGBA,etc) 00117 long pixelbytes; // number of bytes for pixels 00118 long newpixels; // need to copy pixels during bind 00119 long alignment; // texture byte alignment 00120 long rowlength; // texture rowlength 00121 t_symbol *refmatname; // reference matrix name 00122 long refmatrowlength;// texture rowlength if using cached pixel address 00123 long refmatsize; // texture size if using cached pixel address 00124 char bound[MAX_TEXTURE_UNITS]; // used to determine what should be called in unbind 00125 long capturing; // flag if in capture mode 00126 long share; // flag for sharing across contexts in capture mode 00127 t_jit_gl_pbo *pbo; // pixel buffer object 00128 t_jit_gl_support *support; // cached support struct 00129 t_jit_gl_context gencontext; // cache which context at glGenTextures() call 00130 void *readbackmatrix;// matrix used for readbacks 00131 void *readback; // readback interface 00132 long bindid; // either id or readback->buffer for reporting to glid attribute 00133 void *fbocontext; // jit.gl.fbo object if attached to a patcher or JS created FBO object 00134 GLenum *fboattachment; // if fbocontext is set, this is the attachment point in the FBO 00135 long capture_depthbits; // bit depth for capture depth buffer 00136 t_symbol *capture_buffer; // buffer of a readback to copy 00137 t_symbol *capture_source; // named texture with a readback mechanism to copy a buffer from 00138 long capture_attached; // flag for determining if the texture has been attached to a capture_source 00139 t_symbol * compare_mode; // GL_TEXTURE_COMPARE_MODE_ARB (GL_NONE or GL_COMPARE_R_TO_TEXTURE) 00140 t_symbol * compare_func; // GL_TEXTURE_COMPARE_FUNC_ARB (GL_LEQUAL or GL_GEQUAL) 00141 t_symbol * texture_mode; // GL_DEPTH_TEXTURE_MODE_ARB (GL_LUMINANCE, GL_INTENSITY, or GL_ALPHA) 00142 long cubemap_face; // if target is a cubemap, this is its face 00143 long submitted; // set if texture has been submitted (can use glTexSubImage w/o error) 00144 00145 // matrix-like subimage data attrs 00146 long srcdimstart[3]; 00147 long srcdimend[3]; 00148 long dstdimstart[3]; 00149 long dstdimend[3]; 00150 long usesrcdim; 00151 long usedstdim; 00152 00153 void *subtex_matrix; // this is needed to grab data for submitting to glTexSubImage 00154 long subtex_submission; // this is a flag used it jit_gl_texture_bind and 00155 // functions called by it to know what the last data sent to 00156 // jit.gl.texture was a subtex_matrix submission 00157 00158 } t_jit_gl_texture; 00159 00160 /*************************************************************************/ 00161 00162 t_jit_err jit_gl_texture_init(void); 00163 t_jit_gl_texture *jit_gl_texture_new(t_symbol * dest_name); 00164 void jit_gl_texture_free(t_jit_gl_texture *x); 00165 void jit_gl_texture_destroy(t_jit_gl_texture *x); 00166 void jit_gl_texture_destroy_data(t_jit_gl_texture *x); 00167 void jit_gl_texture_destroy_existing(t_jit_gl_texture *x); 00168 void jit_gl_texture_destroy_readback(t_jit_gl_texture *x); 00169 void jit_gl_texture_destroy_pixels(t_jit_gl_texture *x); 00170 00171 t_jit_err jit_gl_texture_generate(t_jit_gl_texture *x); 00172 00173 t_jit_err jit_gl_texture_dest_closing(t_jit_gl_texture *x); 00174 t_jit_err jit_gl_texture_draw(t_jit_gl_texture *x); 00175 t_jit_err jit_gl_texture_dest_changed(t_jit_gl_texture *x); 00176 t_jit_err jit_gl_texture_read(t_jit_gl_texture *x, t_symbol *s, long argc, t_atom *argv); 00177 t_jit_err jit_gl_texture_read_typed(t_jit_gl_texture *x, t_symbol *s, long ac, t_atom *av, t_atom *rv); 00178 00179 void jit_gl_texture_recalc( t_jit_gl_texture *x ); 00180 void jit_gl_texture_rematrix( t_jit_gl_texture *x ); 00181 void jit_gl_texture_notify(t_jit_gl_texture *x, t_symbol *s, t_symbol *msg, t_object *sender, void *data); 00182 00183 t_jit_err jit_gl_texture_setattr_dim(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00184 t_jit_err jit_gl_texture_setattr_file(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00185 t_jit_err jit_gl_texture_setattr_adapt(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00186 t_jit_err jit_gl_texture_setattr_type(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00187 t_jit_err jit_gl_texture_setattr_colormode(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00188 t_jit_err jit_gl_texture_setattr_compress(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00189 t_jit_err jit_gl_texture_setattr_mode(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00190 t_jit_err jit_gl_texture_setattr_apply(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00191 t_jit_err jit_gl_texture_setattr_correction(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00192 t_jit_err jit_gl_texture_setattr_rectangle(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00193 t_jit_err jit_gl_texture_setattr_wrap(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00194 t_jit_err jit_gl_texture_setattr_filter(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00195 t_jit_err jit_gl_texture_setattr_mipmap(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00196 t_jit_err jit_gl_texture_setattr_texgen(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00197 t_jit_err jit_gl_texture_setattr_wrap(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00198 t_jit_err jit_gl_texture_setattr_function(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00199 t_jit_err jit_gl_texture_setattr_weight(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00200 t_jit_err jit_gl_texture_setattr_offset(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00201 t_jit_err jit_gl_texture_setattr_source(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00202 t_jit_err jit_gl_texture_setattr_operand(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00203 t_jit_err jit_gl_texture_setattr_bordercolor(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00204 t_jit_err jit_gl_texture_setattr_blendcolor(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00205 t_jit_err jit_gl_texture_setattr_anisotropy(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00206 t_jit_err jit_gl_texture_setattr_priority(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00207 t_jit_err jit_gl_texture_setattr_autoscale(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00208 t_jit_err jit_gl_texture_setattr_share(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00209 t_jit_err jit_gl_texture_setattr_flip(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00210 t_jit_err jit_gl_texture_setattr_debug(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00211 t_jit_err jit_gl_texture_setattr_capture_source(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00212 t_jit_err jit_gl_texture_setattr_capture_buffer(t_jit_gl_texture *x, void *attr, long argc, t_atom *argv); 00213 00214 t_jit_err jit_gl_texture_create_default_matrix(t_jit_gl_texture *x); 00215 t_jit_err jit_gl_texture_matrix_format(t_jit_gl_texture *x, void *matrix, t_jit_matrix_info *minfo, t_matrix_conv_info *mcinfo, long cached); 00216 00217 void jit_gl_texture_subtex_matrix(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00218 void jit_gl_texture_jit_matrix(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00219 void jit_gl_texture_domatrix(t_jit_gl_texture *x, void *matrix, t_symbol *matrix_name); 00220 00221 t_jit_err jit_gl_texture_tomatrix(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00222 00223 t_jit_err jit_gl_texture_copy( t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00224 t_jit_err jit_gl_texture_bind(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00225 t_jit_err jit_gl_texture_setup_bind(t_jit_gl_texture *x); 00226 t_jit_err jit_gl_texture_unbind(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00227 00228 t_jit_err jit_gl_texture_create_dynamic(t_jit_gl_texture *x, t_jit_matrix_info *minfo, char *bp); 00229 t_jit_err jit_gl_texture_submit_dynamic(t_jit_gl_texture *x, t_jit_matrix_info *minfo, char *bp, char **result); 00230 t_jit_err jit_gl_texture_enable_dynamic(t_jit_gl_texture *x, t_jit_matrix_info *minfo, char *bp); 00231 t_jit_err jit_gl_texture_disable_dynamic(t_jit_gl_texture *x); 00232 00233 t_jit_err jit_gl_texture_draw_quad(t_jit_gl_texture *x, float x0, float y0, float x1, float y1); 00234 00235 void jit_gl_texture_screen_grab(t_jit_gl_texture *x, int screen_w, int screen_h, int dx, int dy); 00236 t_jit_err jit_gl_texture_depth_grab(t_jit_gl_texture *x, long screen_w, long screen_h); 00237 void jit_gl_texture_do_screen_grab(t_jit_gl_texture *x, t_object *source); 00238 void jit_gl_texture_do_depth_grab(t_jit_gl_texture *x, t_object *source); 00239 t_jit_err jit_gl_texture_format_for_grab(t_jit_gl_texture *x); 00240 00241 t_jit_err jit_gl_texture_choose_internal_format( 00242 t_symbol *colormode, t_symbol *datatype, t_symbol *mode, 00243 GLenum *internal, GLenum *format, GLenum *type, long flags); 00244 00245 t_jit_err jit_gl_texture_choose_pixelformat(t_jit_gl_texture *x, t_jit_gl_pixelformat *pf); 00246 00247 void jit_gl_texture_get_translate(t_jit_gl_texture *x, float *xyz); 00248 void jit_gl_texture_get_rotate(t_jit_gl_texture *x, float *xyz); 00249 void jit_gl_texture_get_scale(t_jit_gl_texture *x, float *xyz); 00250 00251 t_jit_err jit_gl_texture_get_format_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00252 t_jit_err jit_gl_texture_get_compress_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00253 t_jit_err jit_gl_texture_get_correction_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00254 t_jit_err jit_gl_texture_get_apply_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00255 t_jit_err jit_gl_texture_get_wrap_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00256 t_jit_err jit_gl_texture_get_function_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00257 t_jit_err jit_gl_texture_get_source_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00258 t_jit_err jit_gl_texture_get_operand_from_symbol(t_jit_gl_texture *x ,t_symbol *s, GLenum *e); 00259 t_jit_err jit_gl_texture_get_filter_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00260 t_jit_err jit_gl_texture_get_mipmap_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00261 t_jit_err jit_gl_texture_get_compare_mode_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00262 t_jit_err jit_gl_texture_get_compare_func_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00263 t_jit_err jit_gl_texture_get_texture_mode_from_symbol(t_jit_gl_texture *x, t_symbol *s, GLenum *e); 00264 t_jit_err jit_gl_texture_get_gl_context(t_jit_gl_texture *x, t_jit_gl_context *context); 00265 void jit_gl_texture_get_color(t_jit_gl_texture *x, float *red, float *green, float *blue, float *alpha); 00266 00267 t_jit_err jit_gl_texture_force_create(t_jit_gl_texture *x); 00268 t_jit_err jit_gl_texture_create(t_jit_gl_texture *x, t_jit_object *matrix); 00269 t_jit_err jit_gl_texture_create_storage(t_jit_gl_texture *x, char *bp); 00270 t_jit_err jit_gl_texture_submit_data(t_jit_gl_texture *x, char *bp); 00271 t_jit_err jit_gl_texture_enable_wrap_mode(t_jit_gl_texture *x); 00272 t_jit_err jit_gl_texture_enable_filter_mode(t_jit_gl_texture *x); 00273 t_jit_err jit_gl_texture_enable_border(t_jit_gl_texture *x); 00274 t_jit_err jit_gl_texture_enable_priority(t_jit_gl_texture *x); 00275 t_jit_err jit_gl_texture_enable_target(t_jit_gl_texture *x); 00276 t_jit_err jit_gl_texture_enable_compression(t_jit_gl_texture *x); 00277 t_jit_err jit_gl_texture_bind_target(t_jit_gl_texture *x); 00278 t_jit_err jit_gl_texture_disable_target(t_jit_gl_texture *x); 00279 t_jit_err jit_gl_texture_enable_transform(t_jit_gl_texture *x); 00280 t_jit_err jit_gl_texture_disable_transform(t_jit_gl_texture *x); 00281 t_jit_err jit_gl_texture_enable_texgen(t_jit_gl_texture *x); 00282 t_jit_err jit_gl_texture_disable_texgen(t_jit_gl_texture *x); 00283 t_jit_err jit_gl_texture_enable_texenv(t_jit_gl_texture *x); 00284 t_jit_err jit_gl_texture_disable_texenv(t_jit_gl_texture *x); 00285 t_jit_err jit_gl_texture_enable_depth_tex_mode(t_jit_gl_texture *x); 00286 00287 t_jit_err jit_gl_texture_force_create(t_jit_gl_texture *x); 00288 00289 long jit_gl_texture_enable_unit(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00290 long jit_gl_texture_disable_unit(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00291 00292 t_jit_err jit_gl_texture_setup_capture(t_jit_gl_texture *x, long capturemode); 00293 t_jit_err jit_gl_texture_begin_capture(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00294 t_jit_err jit_gl_texture_capture_mode(t_jit_gl_texture *x, long mode); 00295 t_jit_err jit_gl_texture_end_capture(t_jit_gl_texture *x, t_symbol *s, int argc, t_atom *argv); 00296 00297 t_jit_err jit_gl_texture_convert_matrix_data(t_jit_gl_texture *x, t_jit_matrix_info *minfo, char *bp, char **result); 00298 00299 void jit_gl_texture_convert_f32_to_f16_calc( 00300 t_jit_gl_texture *x, long dimcount, long *dim, long planecount, 00301 t_jit_matrix_info *in_minfo, char *bip, t_jit_parallel_ndim_worker *w); 00302 00303 long jit_gl_texture_calc_max_mipmap_count(t_jit_gl_texture *x); 00304 long jit_gl_get_datasize_from_datatype(GLenum e); 00305 00306 /*************************************************************************/ 00307 00308 static float JIT_GL_AXIS_X[] = { 1.0f, 0.0f, 0.0f, 0.0f }; 00309 static float JIT_GL_AXIS_Y[] = { 0.0f, 1.0f, 0.0f, 0.0f }; 00310 static float JIT_GL_AXIS_Z[] = { 0.0f, 0.0f, 1.0f, 0.0f }; 00311 static float JIT_GL_AXIS_W[] = { 0.0f, 0.0f, 0.0f, 1.0f }; 00312 00313 /****************************************************************************/ 00314 00315 extern t_symbol *ps_jit_gl_texture_correction_fastest; 00316 extern t_symbol *ps_jit_gl_texture_correction_nicest; 00317 00318 extern t_symbol *ps_jit_gl_colormode_alpha; 00319 extern t_symbol *ps_jit_gl_colormode_luminance; 00320 extern t_symbol *ps_jit_gl_colormode_intensity; 00321 extern t_symbol *ps_jit_gl_colormode_depth; 00322 extern t_symbol *ps_jit_gl_colormode_lumalpha; 00323 extern t_symbol *ps_jit_gl_colormode_rgb; 00324 extern t_symbol *ps_jit_gl_colormode_argb; 00325 extern t_symbol *ps_jit_gl_colormode_uyvy; 00326 extern t_symbol *ps_jit_gl_colormode_auto; 00327 00328 extern t_symbol *ps_jit_gl_texture_adapt; 00329 00330 extern t_symbol *ps_jit_gl_texture_apply_replace; 00331 extern t_symbol *ps_jit_gl_texture_apply_decal; 00332 extern t_symbol *ps_jit_gl_texture_apply_modulate; 00333 extern t_symbol *ps_jit_gl_texture_apply_blend; 00334 extern t_symbol *ps_jit_gl_texture_apply_combine; 00335 00336 extern t_symbol *ps_jit_gl_texture_wrap_clamp; 00337 extern t_symbol *ps_jit_gl_texture_wrap_repeat; 00338 extern t_symbol *ps_jit_gl_texture_wrap_clampedge; 00339 extern t_symbol *ps_jit_gl_texture_wrap_clampborder; 00340 extern t_symbol *ps_jit_gl_texture_wrap_mirroredrepeat; 00341 00342 extern t_symbol *ps_jit_gl_texture_mode_dynamic; 00343 extern t_symbol *ps_jit_gl_texture_mode_static; 00344 extern t_symbol *ps_jit_gl_texture_mode_capture; 00345 00346 extern t_symbol *ps_jit_gl_texture_type_auto; 00347 extern t_symbol *ps_jit_gl_texture_type_char; 00348 extern t_symbol *ps_jit_gl_texture_type_long; 00349 extern t_symbol *ps_jit_gl_texture_type_half; 00350 extern t_symbol *ps_jit_gl_texture_type_float; // same type as float32 00351 extern t_symbol *ps_jit_gl_texture_type_float16; // same type as half 00352 extern t_symbol *ps_jit_gl_texture_type_float32; 00353 00354 extern t_symbol *ps_jit_gl_texture_texgen_objectspace; 00355 extern t_symbol *ps_jit_gl_texture_texgen_eyespace; 00356 extern t_symbol *ps_jit_gl_texture_texgen_environment; 00357 extern t_symbol *ps_jit_gl_texture_texgen_projected; 00358 00359 extern t_symbol *ps_jit_gl_texture_function_replace; 00360 extern t_symbol *ps_jit_gl_texture_function_modulate; 00361 extern t_symbol *ps_jit_gl_texture_function_add; 00362 extern t_symbol *ps_jit_gl_texture_function_addsigned; 00363 extern t_symbol *ps_jit_gl_texture_function_subtract; 00364 extern t_symbol *ps_jit_gl_texture_function_interpolate; 00365 extern t_symbol *ps_jit_gl_texture_function_dot3rgb; 00366 extern t_symbol *ps_jit_gl_texture_function_dot3rgba; 00367 00368 extern t_symbol *ps_jit_gl_texture_source_texture; 00369 extern t_symbol *ps_jit_gl_texture_source_color; 00370 extern t_symbol *ps_jit_gl_texture_source_constant; 00371 extern t_symbol *ps_jit_gl_texture_source_previous; 00372 00373 extern t_symbol *ps_jit_gl_texture_operand_color; 00374 extern t_symbol *ps_jit_gl_texture_operand_oneminuscolor; 00375 extern t_symbol *ps_jit_gl_texture_operand_alpha; 00376 extern t_symbol *ps_jit_gl_texture_operand_oneminusalpha; 00377 00378 extern t_symbol *ps_jit_gl_texture_filter_none; 00379 extern t_symbol *ps_jit_gl_texture_filter_nearest; 00380 extern t_symbol *ps_jit_gl_texture_filter_linear; 00381 00382 extern t_symbol *ps_jit_gl_texture_mipmap_none; 00383 extern t_symbol *ps_jit_gl_texture_mipmap_nearest; 00384 extern t_symbol *ps_jit_gl_texture_mipmap_linear; 00385 extern t_symbol *ps_jit_gl_texture_mipmap_bilinear; 00386 extern t_symbol *ps_jit_gl_texture_mipmap_trilinear; 00387 00388 t_symbol *ps_jit_gl_texture_compare_mode_none; 00389 t_symbol *ps_jit_gl_texture_compare_mode_compare_r_to_texture; 00390 00391 t_symbol *ps_jit_gl_texture_compare_func_lequal; 00392 t_symbol *ps_jit_gl_texture_compare_func_gequal; 00393 t_symbol *ps_jit_gl_texture_compare_func_less; 00394 t_symbol *ps_jit_gl_texture_compare_func_greater; 00395 t_symbol *ps_jit_gl_texture_compare_func_equal; 00396 t_symbol *ps_jit_gl_texture_compare_func_notequal; 00397 t_symbol *ps_jit_gl_texture_compare_func_always; 00398 t_symbol *ps_jit_gl_texture_compare_func_never; 00399 00400 t_symbol *ps_jit_gl_texture_texture_mode_luminance; 00401 t_symbol *ps_jit_gl_texture_texture_mode_intensity; 00402 t_symbol *ps_jit_gl_texture_texture_mode_alpha; 00403 00404 extern t_symbol *ps_jit_gl_texture_compress_none; 00405 extern t_symbol *ps_jit_gl_texture_compress_dxt1; 00406 extern t_symbol *ps_jit_gl_texture_compress_dxt3; 00407 extern t_symbol *ps_jit_gl_texture_compress_dxt5; 00408 00409 extern t_symbol *ps_nobox, *ps_atomarray; 00410 00411 t_symbol *ps_capture_complete, *ps_depth, *ps_color; 00412 t_symbol *ps_capture_source, *ps_free; 00413 00414 extern long _jit_gl_texture_verbose; 00415 #define TEXTURE_VERBOSE_POST if (_jit_gl_texture_verbose) post 00416 00417 00418 /*************************************************************************/ 00419 00420 00421 #if C74_PRAGMA_STRUCT_PACKPUSH 00422 #pragma pack(pop) 00423 #elif C74_PRAGMA_STRUCT_PACK 00424 #pragma pack() 00425 #endif 00426 00427 #ifdef __cplusplus 00428 } 00429 #endif 00430 00431 /****************************************************************************/ 00432 #endif
Copyright © 2008, Cycling '74