Forums > Jitter

jit.gl.graph color problems

April 21, 2006 | 6:29 pm

hi,

i’m using jit.gl.graph but I can’t seem to change the color attribute. In the helpfile it doesn’t seem to work either. I tried using "@texture blue" as in the help file but that didn’t work.
Am I doing something wrong? If it’s a bug is there a workaround? I need this stay on the GPU so it’s fast.

thanks,

oli

max v2;
#N vpatcher 315 298 915 698;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 85 34 79 196617 open , loop 1 , 1;
#N sfplay~ 1 120960 0 ;
#P newobj 85 58 50 196617 sfplay~ 1;
#P newex 104 283 55 196617 t b erase b;
#P newex 104 323 172 196617 jit.gl.render foo @depth_enable 0;
#P newex 2 134 40 196617 key;
#P newex 2 163 38 196617 sel 32;
#P toggle 2 186 15 0;
#P message 2 207 70 196617 fullscreen $1;
#P number 268 56 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 228 56 15 0;
#P newex 228 79 50 196617 qmetro 2;
#P user panel 221 50 81 52;
#X brgb 255 255 255;
#X frgb 100 202 30;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P user ezdac~ 27 94 71 127 0;
#P newex 2 234 145 196617 jit.window foo @fsmenubar 0;
#P newex 104 144 183 196617 jit.catch~ 1 @mode 2;
#P newex 135 189 307 196617 jit.gl.graph foo @depth_enable 0 @circpoints 1 @color 0. 0. 1. 1;
#P connect 11 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 8 0;
#P connect 8 0 2 0;
#P connect 14 0 3 0;
#P connect 14 0 3 1;
#P connect 15 0 14 0;
#P connect 14 0 1 0;
#P connect 5 0 1 0;
#P connect 1 0 13 0;
#P connect 13 1 12 0;
#P connect 13 0 12 0;
#P connect 1 0 0 0;
#P connect 6 0 5 0;
#P connect 7 0 5 1;
#P pop;


April 21, 2006 | 6:51 pm

Thanks for he report. This is a known bug (had thought was fixed in
1.5.2, but perhaps requires forthcoming 1.5.3). You can either use a
texture or use jit.gl.sketch to set the color and then draw, ignoring
object attributes with the drawobject 1 command. Check
the help file and list archives for more examples of the drawobject
drawing command.

-Joshua


April 21, 2006 | 7:43 pm

i tried what you said but still it doesn’t change color. here’s the patch:

thanks for your help

oli

max v2;
#N vpatcher 79 353 506 761;
#P window setfont "Sans Serif" 9.;
#P window linecount 2;
#P message 203 232 140 196617 reset , glcolor 1. 0. 0. 1. , drawobject graph1 1;
#P window linecount 1;
#P newex 203 271 172 196617 jit.gl.sketch foo @depth_enable 0;
#P message 85 34 79 196617 open , loop 1 , 1;
#N sfplay~ 1 120960 0 ;
#P newobj 85 58 50 196617 sfplay~ 1;
#P newex 181 109 130 196617 t b erase b b;
#P newex 104 323 172 196617 jit.gl.render foo @depth_enable 0;
#P newex 2 134 40 196617 key;
#P newex 2 163 38 196617 sel 27;
#P toggle 2 186 15 0;
#P message 2 207 70 196617 fullscreen $1;
#P number 268 56 28 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 228 56 15 0;
#P newex 228 79 50 196617 qmetro 2;
#P user panel 221 50 81 52;
#X brgb 255 255 255;
#X frgb 100 202 30;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P user ezdac~ 27 94 71 127 0;
#P newex 2 234 145 196617 jit.window foo @fsmenubar 0;
#P newex 104 144 183 196617 jit.catch~ 1 @mode 2;
#P window linecount 2;
#P newex 104 177 218 196617 jit.gl.graph foo @depth_enable 0 @circpoints 2 @automatic 0 @name graph1;
#P connect 11 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 8 0;
#P connect 8 0 2 0;
#P connect 14 0 3 0;
#P connect 14 0 3 1;
#P connect 15 0 14 0;
#P connect 13 2 1 0;
#P connect 14 0 1 0;
#P connect 1 0 0 0;
#P connect 13 0 12 0;
#P connect 13 1 12 0;
#P connect 5 0 13 0;
#P connect 17 0 16 0;
#P connect 6 0 5 0;
#P connect 7 0 5 1;
#P pop;


April 21, 2006 | 7:53 pm

Okay, sorry or the wrong advice. Fixed in next version, for now, need
to use a colored texture.

-Joshua


Viewing 4 posts - 1 through 4 (of 4 total)