Forums > Jitter

saving and loading GL commands to files


VG
December 18, 2007 | 11:21 am

Hi,

This topic has probably been raised in the past but couldn’t find
any better solution until now.

I wanted to save and load gl_commands into a jit.gl.sketch object
but found out it was very long to load.
I takes about 15 min for a 10Mb text file containing all glcommands
outputed from jit.gl.sketch with the message "getcmdlist"

My jit.gl.sketch has "automatic 0" attribute and is not banged while loading/saving.
Is there any faster way of doing this? I tried packing data in a qt movie as
shown in Andrew Benson’s recipes but it was hardly faster, and file size which
I thought would be less if binary format, was not so lesser.

Thanks for any hint..

Vincent

http://www.pucemuse.com

#P window setfont "Sans Serif" 24.;
#P window linecount 1;
#P comment 596 73 34 9109528 3.;
#P window setfont "Sans Serif" 9.;
#P comment 621 84 100 9109513 load and wait…;
#P window setfont "Sans Serif" 24.;
#P comment 338 64 34 9109528 2.;
#P window setfont "Sans Serif" 9.;
#P comment 363 75 100 9109513 save and wait…;
#P newex 303 124 67 9109513 s ClockOnOff;
#P button 62 88 48 0;
#P newex 62 140 42 9109513 uzi 3000;
#P message 582 313 14 9109513 1;
#P newex 582 335 67 9109513 s ClockOnOff;
#P newex 66 388 65 9109513 r ClockOnOff;
#P newex 809 239 44 9109513 zl slice 1;
#P newex 809 217 62 9109513 route cmdlist;
#P button 686 241 15 0;
#P newex 874 150 38 9109513 t query;
#P message 900 88 28 9109513 clear;
#P newex 353 203 43 9109513 deferlow;
#P message 157 223 55 9109513 getcmdlist;
#P newex 843 264 70 9109513 s To_Sketch_1;
#P newex 353 276 42 9109513 s toText;
#P newex 601 312 42 9109513 s toText;
#P newex 562 175 42 9109513 s toText;
#P newex 809 94 40 9109513 r toText;
#P message 160 189 95 9109513 cylinder 0 0.6 0.25;
#P message 94 189 63 9109513 cylinder 0.4;
#P message 152 171 104 9109513 sphere 0.7 0 90 0 90;
#P message 94 171 55 9109513 sphere 0.5;
#P button 25 287 15 0;
#P message 25 188 29 9109513 reset;
#P newex 100 527 70 9109513 s To_Sketch_1;
#P toggle 285 511 15 0;
#P newex 246 510 35 9109513 sel 27;
#P newex 66 465 43 9109513 jit.qball;
#P message 285 529 68 9109513 fullscreen $1;
#P number 111 416 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 66 416 15 0;
#P newex 66 442 55 9109513 metro 20;
#P newex 66 496 61 9109513 t b b b erase;
#P newex 66 549 73 9109513 jit.gl.render test;
#P newex 203 553 135 9109513 jit.window test @depthbuffer 1;
#P newex 201 510 40 9109513 key;
#P newex 173 314 113 9109513 s 1_From_Sketch_Pen_1;
#P newex 48 314 113 9109513 s 1_From_Sketch_Pen_0;
#P newex 48 254 68 9109513 r To_Sketch_1;
#P newex 48 286 136 9109513 jit.gl.sketch test @automatic 0;
#P newex 939 148 81 9109513 s file.GLcmd.size;
#P button 303 60 34 0;
#P button 562 70 34 0;
#P newex 809 192 145 9109513 route set;
#P newex 809 124 141 9109513 text glCommands;
#P newex 610 176 70 9109513 s To_Sketch_1;
#P newex 568 243 44 9109513 uzi 100;
#P number 602 273 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 602 292 45 9109513 line $1;
#P newex 568 218 79 9109513 r file.GLcmd.size;
#P newex 658 153 67 9109513 s ClockOnOff;
#P newex 562 108 106 9109513 t read reset 0;
#P comment 688 175 100 9109513 clear sketch;
#P user panel 544 34 230 324;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P newex 442 121 67 9109513 s ClockOnOff;
#P newex 303 98 160 9109513 t 1 write b 0;
#P newex 464 240 58 9109513 append cr;
#P newex 403 211 71 9109513 route attributes;
#P newex 403 188 111 9109513 r 1_From_Sketch_Pen_1;
#P button 403 122 15 0;
#P newex 403 166 70 9109513 s To_Sketch_1;
#P message 403 145 55 9109513 getcmdlist;
#P user panel 299 37 230 324;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 24.;
#P comment 111 88 34 9109528 1.;
#P window setfont "Sans Serif" 9.;
#P comment 134 103 100 9109513 create lots of GL data;
#P connect 26 0 42 0;
#P connect 26 0 25 0;
#P connect 46 0 25 0;
#P connect 45 0 25 0;
#P connect 41 0 25 0;
#P connect 52 0 25 0;
#P connect 25 0 27 0;
#P connect 63 0 62 0;
#P connect 59 0 34 0;
#P connect 34 0 33 0;
#P connect 33 0 37 0;
#P connect 37 0 32 0;
#P connect 32 3 31 0;
#P connect 32 0 31 0;
#P connect 62 2 43 0;
#P connect 62 2 45 0;
#P connect 32 2 40 0;
#P connect 35 0 33 1;
#P connect 62 2 44 0;
#P connect 62 2 46 0;
#P connect 25 1 28 0;
#P fasten 36 0 30 0 290 548 208 548;
#P fasten 29 0 38 0 206 529 243 529 243 508 251 508;
#P fasten 38 0 39 0 251 528 282 528 282 508 290 508;
#P connect 39 0 36 0;
#P connect 23 0 9 0;
#P connect 9 0 64 0;
#P connect 9 1 53 0;
#P fasten 8 0 50 0 469 270 358 270;
#P connect 53 0 50 0;
#P connect 9 2 5 0;
#P connect 5 0 3 0;
#P connect 3 0 4 0;
#P connect 6 0 7 0;
#P connect 9 3 10 0;
#P connect 7 1 8 0;
#P connect 22 0 13 0;
#P connect 13 0 48 0;
#P connect 15 0 18 0;
#P connect 56 0 18 0;
#P connect 18 1 61 0;
#P connect 61 0 60 0;
#P connect 16 0 49 0;
#P connect 18 2 17 0;
#P connect 17 0 16 0;
#P connect 13 1 19 0;
#P connect 13 2 14 0;
#P connect 47 0 20 0;
#P connect 54 0 20 0;
#P fasten 55 0 20 0 879 177 1024 177 1024 116 814 116;
#P connect 20 0 21 0;
#P connect 21 0 57 0;
#P connect 57 0 58 0;
#P connect 58 1 51 0;
#P connect 20 1 55 0;
#P connect 20 2 24 0;
#P window clipboard copycount 69;


Viewing 1 post (of 1 total)