Forums > Jitter

gl.sketch dimension?

February 13, 2007 | 1:43 pm

hi all,

probably kinda stupid question here, but I am finally digging into the gl stuff.

my question then is how to increase the dimension/resolution of the objects I draw in jit.gl.sketch? I just want a smooth surface…

I know its probably obvious, but I was working too late, and couldn’t find it in the docs, blue or redbook…

thanks in advance…
mjb
………………………..
http://www.mbiederman.com
http://www.simpel.cc
http://www.papercuptelephone.org



VG
February 13, 2007 | 4:44 pm


February 13, 2007 | 6:26 pm

When you say "resolution" are you talking about the window that the
objects are being drawn into, or are you referring to the vertex count
of the OpenGL geometry you drawing? If you want anti-aliased edges in
OpenGL, you will need to turn on @fsaa in your jit.window.

Andrew B.


February 14, 2007 | 7:28 pm

hi all -

Ive read the tutorials, thanks.

"dim $1 $2" has no bearing on my gl.sketch object which i why i asked the question. it was my first try, so rather than getting all high and mighty, let’s try and be social, no, VG?

andrew – thanks, I am looking to increase the vertex count in the actual object. so like whne making a circle, I get a nice round one, rather than the chunky one I am left with. as i said above, the dim message gets me nowhere, which i find a bit odd. Im on a MBP CD 2.16 with 10.4.8.

thanks again
m


February 14, 2007 | 7:55 pm

To increase (or decrease) the number of vertices used to draw one of the
given simple shapes in jit.gl.sketch, you will need to use the
"shapeslice x y" message before sending the message to draw your shape.
Here is a simple example of this:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 276 106 114 196617 jit.window foo @fsaa 1;
#P newex 124 85 78 196617 jit.gl.handle foo;
#P message 186 146 166 196617 reset , shapeslice 50 50 , sphere 0.5;
#P message 186 129 166 196617 reset , shapeslice 10 10 , sphere 0.5;
#P toggle 28 44 15 0;
#P newex 28 70 57 196617 qmetro 20;
#P newex 28 124 50 196617 t erase b;
#P newex 112 176 258 196617 jit.gl.sketch foo @poly_mode 1 1 @color 0.9
0.9 0.9 1.;
#B color 5;
#P newex 28 175 80 196617 jit.gl.render foo;
#P connect 3 0 2 0;
#P fasten 2 1 0 0 73 158 33 158;
#P connect 2 0 0 0;
#P fasten 7 0 1 0 129 169 117 169;
#P connect 5 0 1 0;
#P connect 6 0 1 0;
#P connect 4 0 3 0;
#P window clipboard copycount 9;

Cheers,
Andrew B.


February 14, 2007 | 9:14 pm

andrew benson skrev:
> To increase (or decrease) the number of vertices used to draw one of the
> given simple shapes in jit.gl.sketch, you will need to use the
> "shapeslice x y" message before sending the message to draw your shape.
For me it’s also the perfect option for "openGL bitcrushing" . I love it
when things get "sketchy" like that, pun intended. It’s cheap too.
Andy.

#P toggle 242 45 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 242 70 55 9109513 qmetro 100;
#P number 242 129 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 2 3 8;
#X flags 0 0;
#P newobj 242 99 66 9109513 counter 2 3 8;
#P message 215 153 155 9109513 reset , shapeslice $1 $1 , sphere 0.5;
#P newex 103 69 114 9109513 jit.window foo @fsaa 1;
#P toggle 28 44 15 0;
#P newex 28 70 57 9109513 qmetro 20;
#P newex 28 99 50 9109513 t erase b;
#P newex 112 176 258 9109513 jit.gl.sketch foo @poly_mode 1 1 @color 0.9
0.9 0.9 1.;
#B color 5;
#P newex 28 175 80 9109513 jit.gl.render foo;
#P fasten 8 0 6 0 247 147 220 147;
#P connect 9 0 7 0;
#P connect 7 0 8 0;
#P connect 10 0 9 0;
#P connect 3 0 2 0;
#P fasten 6 0 1 0 220 173 117 173;
#P connect 4 0 3 0;
#P connect 2 0 0 0;
#P fasten 2 1 0 0 73 158 33 158;
#P window clipboard copycount 11;


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