open GL text texture mapping

Mar 10, 2006 at 11:58pm

open GL text texture mapping

I’m trying to create a patch that uses open GL text rendering, (because it should be more efficient as the open GL work is done by teh graphics processor, am I right in thinking that?) and also so I can move the text around the screen, use different fonts, etc.
However I want the text to have that same alpha inversion look as featured in the tutorial patch on “using the alpha channel”
So I am trying to use an inverted version of a matrix as the texture map for the text. However this is not working, the text just appears grey and fuzzed out. This is an example patch of what I’m attempting to accomplish.

Also where can Information on creating a stand alone application using Max/jitter? Every Time I attempt to do this with jitter objects in the patch, it just refuses to compile.

Thanks again
Casey

max v2;
#N vpatcher 295 269 895 669;
#P user jit.pwindow 229 114 82 62 0 1 0 0 1 0;
#P window setfont “Century Gothic” 14.;
#P message 214 268 81 131334158 scale 6 6 6;
#P window setfont “Sans Serif” 9.;
#P newex 54 44 52 196617 r qt_bang;
#P window setfont “Century Gothic” 14.;
#P message 76 269 96 131334158 text help me;
#P window setfont “Sans Serif” 9.;
#P newex 56 160 94 196617 send matrix_finish;
#P newex 270 308 125 196617 receive text_render_bang;
#P newex 75 348 239 196617 jit.gl.text2d yesser @blend_enable 1 @automatic 0;
#P window setfont “Century Gothic” 14.;
#P message 143 300 87 131334158 texture you;
#P newex 405 254 79 131334158 loadbang;
#P newex 118 213 152 131334158 prepend texture you;
#P newex 443 35 123 131334158 jit.window yesser;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 118 191 141 1441802 jit.op @op !- @val 255;
#P window setfont Times 10.;
#P comment 226 90 27 1310730 Read;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 132 67 53 1441802 loadbang;
#P message 132 90 92 1441802 read ozone.mov;
#P newex 55 116 128 1441802 jit.qt.movie 320 240;
#P window setfont “Century Gothic” 14.;
#P message 405 290 147 131334158 texture you 320 240;
#P window setfont “Sans Serif” 9.;
#P newex 375 127 113 196617 send text_render_bang;
#P message 541 145 32 196617 clear;
#P newex 428 157 108 196617 receive matrix_finish;
#P newex 492 128 65 196617 send qt_bang;
#P newex 391 211 344 196617 jit.gl.videoplane yesser @blend_enable 3 @scale 1.333 1. 1. @automatic 0;
#P toggle 359 50 15 0;
#P newex 358 338 98 196617 jit.gl.render yesser;
#P newex 359 95 74 196617 t b b b b erase;
#P newex 359 71 51 196617 qmetro 5;
#P connect 23 0 10 0;
#P fasten 11 0 10 0 137 111 60 111;
#P connect 10 0 21 0;
#P connect 24 0 19 0;
#P connect 22 0 19 0;
#P fasten 18 0 19 0 148 331 80 331;
#P fasten 20 0 19 0 275 343 80 343;
#P connect 17 0 22 0;
#P fasten 10 0 14 0 60 140 123 140;
#P connect 14 0 16 0;
#P connect 12 0 11 0;
#P fasten 17 0 18 0 148 277;
#P connect 17 0 24 0;
#P connect 14 0 25 0;
#P fasten 9 0 2 0 410 332 363 332;
#P fasten 16 0 2 0 123 244 363 244;
#P connect 1 4 2 0;
#P connect 1 0 2 0;
#P connect 3 0 0 0;
#P connect 0 0 1 0;
#P connect 1 1 8 0;
#P connect 1 2 4 0;
#P connect 6 0 4 0;
#P connect 17 0 9 0;
#P fasten 1 3 5 0 412 118 497 118;
#P pop;

#24828
Mar 11, 2006 at 12:19am

See the chapter on Collectives in the Max Tutorials and Topics
manual.

#72371
Mar 14, 2006 at 3:06am

are there an objects like send~ and receive~ in jitter? I want to send
video from one patch to another that has jit.window in it.

thanks, nick

#72372
Mar 14, 2006 at 3:32am

On Mar 13, 2006, at 9:12 PM, Nick wrote:

> are there an objects like send~ and receive~ in jitter? I want to
> send video from one patch to another that has jit.window in it.

They’re called (cough) send and receive.

#72373
Mar 14, 2006 at 3:45am

Would jit.net.send and jit.net.receive have a use to you ?
You may also check “mxj net.maxhole”

William

#72374
Mar 14, 2006 at 6:01am

On Mar 13, 2006, at 7:45 PM, William Wong wrote:

> Would jit.net.send and jit.net.receive have a use to you ?
> You may also check “mxj net.maxhole”

Note that these objects are for sending over the network (though also
useful for sending between two or more copies of MaxMSP running on
the same machine…something of a strategy for maximally exploiting
multiple processor machines).

For sending matrices (which are *just* max messages with the matrix
name), as Gregory pointed out, use the vanilla send and receive
objects. If this is new information to you, it would suggest you
should review the Jitter tutorials.

-Joshua

#72375
Mar 14, 2006 at 6:19am

sorry to ask such a basic question. For some reason I though it would
be send~ or some kind of jitter object and I couldn’t find it in the
tutorials. thanks for your answers.

#72376

You must be logged in to reply to this topic.