Forums > Jitter

jit.gl.texture error message.

January 22, 2007 | 8:01 pm

I have started to get this error:
> jit.gl.texture: setting subteximage during submission.: GL Error:
> Invalid value
The error occurs while sending a 256*256 matrix to [jit.gl.texture skal
@name mintex1] and switching to full-screen – this promptly turns off
texturing. (I am guessing the "submission" part has something to do with
switching to full-screen?)

The odd thing is that:
a: it works while not in full-screen – even a window stretched to full
screen
and b: switching back doesn’t work, and no amount of resending [texture
mintex1] will switch on the texture.

Does anyone here have a hunch about the origin of this problem? I
searched the forum, a few have had the same error, one was fixed by
reinstalling quicktime. That didn’t work here.
I also recall someone saying that textures had to be of certain
dimensions? I am upsampling a 16*16 matrix, then using jit.slide on it,
so I have some room for tweaking if neccesary.

Best,
Andreas (you guys rock!)


January 22, 2007 | 8:09 pm

Hi Andreas,
Can you post your system details like Jitter version, OS, etc. as well
as a small demo patch?

thanks,
wes

On 1/22/07, Andreas Wetterberg wrote:
> I have started to get this error:
> > jit.gl.texture: setting subteximage during submission.: GL Error:
> > Invalid value
> The error occurs while sending a 256*256 matrix to [jit.gl.texture skal
> @name mintex1] and switching to full-screen – this promptly turns off
> texturing. (I am guessing the "submission" part has something to do with
> switching to full-screen?)
>
> The odd thing is that:
> a: it works while not in full-screen – even a window stretched to full
> screen
> and b: switching back doesn’t work, and no amount of resending [texture
> mintex1] will switch on the texture.
>
> Does anyone here have a hunch about the origin of this problem? I
> searched the forum, a few have had the same error, one was fixed by
> reinstalling quicktime. That didn’t work here.
> I also recall someone saying that textures had to be of certain
> dimensions? I am upsampling a 16*16 matrix, then using jit.slide on it,
> so I have some room for tweaking if neccesary.
>
> Best,
> Andreas (you guys rock!)
>
>


January 22, 2007 | 9:22 pm

Wesley Smith skrev:
> Hi Andreas,
> Can you post your system details like Jitter version, OS, etc. as well
> as a small demo patch?
Sure thing, Wes – it took some effort to wrangle the important bits out
of my spaghetti monster ;-)
I am on the latest maxMSP/Jitter with a win XP laptop, Intel GMA950 gpu.
No third-party externals used.

I have left the texturing part of the patch intact for now, since the
error seems to originate there.
Patch below, I hope it’s clean enough – thank you for your time.
Andreas.

——

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 731 28 121 9109513 *** sketch and render ***;
#P comment 355 33 121 9109513 *** Texture generation ***;
#P newex 509 209 56 9109513 loadmess 3;
#P window linecount 3;
#P comment 24 321 52 9109513 ———–> Sends to jit.gl.sketch;
#P comment 440 416 52 9109513 ———–> Sends to jit.gl.sketch;
#P window linecount 1;
#P newex 495 367 45 9109513 loadbang;
#P message 80 161 23 9109513 500;
#P newex 262 52 45 9109513 loadbang;
#P window linecount 2;
#P message 327 72 223 9109513 setcell 11 7 val 255 , setcell 3 9 val
255 , setcell 7 12 val 255 , setcell 4 15 val 255 , setcell 9 4 val 255;
#P window linecount 1;
#P message 421 391 60 9109513 texture none;
#P user ubumenu 495 230 100 9109513 0 1 1 0;
#X add none;
#X add objectspace;
#X add viewspace;
#X add environment;
#X add projected;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 510 255 75 9109513 prepend texgen;
#P user jit.pwindow 516 288 82 62 0 1 0 0 1 0;
#P newex 319 328 109 9109513 prepend texture mintex1;
#P newex 495 412 54 9109513 s sketchup;
#P message 495 392 73 9109513 texture mintex1;
#P window linecount 2;
#P newex 329 297 94 9109513 jit.gl.texture skal @name mintex1;
#P user jit.fpsgui 453 289 60 9109513 0;
#P toggle 432 127 15 0;
#P window linecount 1;
#P newex 432 147 45 9109513 metro 10;
#N counter;
#X flags 0 0;
#P newobj 432 167 66 9109513 counter;
#P newex 327 253 112 9109513 jit.slide @slide_down 100;
#P number 442 191 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 442 206 62 9109513 offset_x $1;
#P toggle 340 137 15 0;
#P newex 340 156 45 9109513 metro 25;
#P newex 327 230 145 9109513 jit.rota @boundmode 2 @interp 1;
#P newex 327 205 109 9109513 jit.matrix 1 char 256 256;
#P newex 319 348 50 9109513 s rendrum;
#P newex 327 183 99 9109513 jit.matrix 1 char 16 16;
#P comment 145 183 132 9109513 draw a square and rotate it;
#P objectname thecomment[4];
#P window setfont "Fixedwidth Serif" 10.;
#P flonum 78 184 37 10 0 0 0 141 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 8;
#P message 77 204 201 9240586 reset , glmatrixmode modelview ,
glpushmatrix , glrotate $1 0 0 1 , glbegin tri_strip , glcolor 1 0 0
1 , glvertex -0.5 -0.5 , glcolor 0 1 0 1 , glvertex -0.5 0.5 ,
glcolor 0 0 1 1 , glvertex 0.5 -0.5 , glcolor 1 1 1 1 , glvertex 0.5
0.5 , glend , glpopmatrix;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 720 357 55 9109513 floating $1;
#P newex 77 320 54 9109513 s sketchup;
#P newex 740 140 45 9109513 loadbang;
#P newex 748 267 48 9109513 r rendrum;
#P newex 735 63 52 9109513 r sketchup;
#P toggle 830 332 15 0;
#P newex 791 332 35 9109513 sel 27;
#P message 774 357 68 9109513 fullscreen $1;
#P newex 746 332 40 9109513 key;
#P newex 720 378 193 9109513 jit.window scam @depthbuffer 1 @floating 1;
#P window setfont "Sans Serif" 18.;
#P user jit.fpsgui 797 248 60 9109522 0;
#P window setfont "Sans Serif" 9.;
#P newex 740 203 43 9109513 jit.qball;
#P number 785 162 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 740 162 15 0;
#P newex 740 181 55 9109513 metro 20;
#P newex 740 226 68 9109513 t b erase b;
#P window linecount 3;
#P newex 735 88 158 9109513 jit.gl.sketch scam @depth_enable 1
@antialias 1 @smooth_shading 1 @lighting_enable 1 @blend_enable 1;
#P window linecount 2;
#P newex 740 289 145 9109513 jit.gl.render scam @antialias 1
@erase_color 0. 0. 0. 1.;
#P window setfont "Sans Serif" 12.;
#P window linecount 3;
#P comment 98 105 100 9109516 * basic shape , ripped from .help file to
illustrate;
#P window setfont "Sans Serif" 9.;
#P window linecount 6;
#P comment 521 100 100 9109513 ^^^^ fills a basic example pattern into
the first matrix – in the full patch these are dynamically generated
from midi input.;
#P window setfont "Sans Serif" 14.;
#P window linecount 5;
#P comment 680 420 252 9109518 * on my system – latest M/M and Jitter ,
win XP laptop , Intel GMA950 gpu – switching to fullscreen turns off
the texture , reporting a large number of errors in the max window.;
#P window setfont "Sans Serif" 9.;
#P window linecount 8;
#P comment 636 100 93 9109513 ————————> All of these
arguments obviously aren’t neccesary for this patch , but those are the
settings I am using in the full patch.;
#P window linecount 3;
#P comment 263 353 52 9109513 ———–> Sends to jit.gl.render;
#P window linecount 1;
#P comment 460 83 58 9109513 < ---------------;
#P user panel 316 66 312 396;
#X brgb 183 154 81;
#X frgb 255 255 255;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 731 45 187 92;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 731 139 187 184;
#X brgb 111 153 124;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 83 30 108 9109513 *** Shape to texture ***;
#P connect 29 0 28 0;
#P connect 29 1 28 0;
#P connect 28 0 26 0;
#P connect 54 0 29 0;
#P connect 53 0 54 0;
#P fasten 39 0 47 0 332 281 324 281;
#P connect 47 0 32 0;
#P connect 53 0 52 0;
#P connect 52 0 31 0;
#P fasten 35 0 31 0 345 179 332 179;
#P connect 31 0 33 0;
#P connect 33 0 34 0;
#P fasten 37 0 34 0 447 226 332 226;
#P connect 34 0 39 0;
#P connect 39 0 44 0;
#P fasten 49 0 44 0 515 282 334 282;
#P connect 53 0 36 0;
#P lcolor 2;
#P connect 36 0 35 0;
#P connect 53 0 42 0;
#P lcolor 2;
#P connect 42 0 41 0;
#P connect 41 0 40 0;
#P connect 40 0 38 0;
#P connect 38 0 37 0;
#P fasten 39 0 43 0 332 281 458 281;
#P connect 58 0 50 0;
#P connect 55 0 45 0;
#P fasten 51 0 46 0 426 410 500 410;
#P connect 45 0 46 0;
#P fasten 50 1 49 0 545 252 515 252;
#P fasten 39 0 48 0 332 281 522 281;
#P fasten 27 0 18 0 725 375 725 375;
#P fasten 20 0 18 0 779 375 725 375;
#P connect 23 0 11 0;
#P connect 25 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 16 0;
#P connect 16 0 12 0;
#P fasten 24 0 10 0 753 287 745 287;
#P fasten 12 0 10 0 745 277 745 277;
#P fasten 12 1 10 0 774 264 745 264;
#P fasten 22 0 20 0 835 351 779 351;
#P connect 15 0 13 1;
#P fasten 19 0 21 0 751 351 788 351 788 330 796 330;
#P connect 12 2 17 0;
#P fasten 21 0 22 0 796 349 828 349 828 329 835 329;
#P window clipboard copycount 61;


January 22, 2007 | 10:10 pm

The biggest problem I noticed in your patch was the jit.gl.texture
object had a context name of skal and all of the other objects were in
context scam. I modified your patch a bit and it works for me on OSX
at least. Note that I added some gltexcoord commands to you sketch
command list to get the texture to show up.

wes

#P window linecount 1;
#P newex 380 351 129 9109513 jit.matrix 2 char 256 256;
#P comment 791 88 145 9109513 *** sketch and render ***;
#P comment 415 93 150 9109513 *** Texture generation ***;
#P newex 569 269 56 9109513 loadmess 3;
#P window linecount 3;
#P comment 84 381 71 9109513 ———–> Sends to jit.gl.sketch;
#P comment 500 476 71 9109513 ———–> Sends to jit.gl.sketch;
#P window linecount 1;
#P newex 555 427 45 9109513 loadbang;
#P message 140 221 23 9109513 500;
#P newex 322 112 45 9109513 loadbang;
#P window linecount 2;
#P message 387 132 257 9109513 setcell 11 7 val 255 , setcell 3 9 val
255 , setcell 7 12 val 255 , setcell 4 15 val 255 , setcell 9 4 val
255;
#P window linecount 1;
#P message 481 451 74 9109513 texture none;
#P user ubumenu 555 290 100 9109513 0 1 1 0;
#X add none;
#X add objectspace;
#X add viewspace;
#X add environment;
#X add projected;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 570 315 75 9109513 prepend texgen;
#P user jit.pwindow 576 348 82 62 0 1 0 0 1 0;
#P newex 555 472 54 9109513 s sketchup;
#P message 555 452 92 9109513 texture mintex1;
#P newex 357 389 330 9109513 jit.gl.texture scam @name mintex1
@colormode lumalpha @rectangle 0;
#P user jit.fpsgui 513 349 60 9109513 0;
#P toggle 492 187 15 0;
#P newex 492 207 59 9109513 metro 10;
#N counter;
#X flags 0 0;
#P newobj 492 227 66 9109513 counter;
#P newex 387 313 131 9109513 jit.slide @slide_down 100;
#P number 502 251 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 502 266 62 9109513 offset_x $1;
#P toggle 400 197 15 0;
#P newex 400 216 59 9109513 metro 25;
#P newex 387 290 164 9109513 jit.rota @boundmode 2 @interp 1;
#P newex 387 265 133 9109513 jit.matrix 1 char 256 256;
#P newex 387 243 123 9109513 jit.matrix 1 char 16 16;
#P comment 205 243 132 9109513 draw a square and rotate it;
#P objectname thecomment[4];
#P window setfont "Fixedwidth Serif" 10.;
#P flonum 138 244 37 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 5;
#P message 137 264 406 1441802 reset , glmatrixmode modelview ,
glpushmatrix , glrotate $1 0 0 1 , glbegin tri_strip , glcolor 1 0
0 1 , glvertex -0.5 -0.5 , gltexcoord 0. 0. , glcolor 0 1 0 1 ,
glvertex -0.5 0.5 , gltexcoord 1. 0. , glcolor 0 0 1 1 , glvertex
0.5 -0.5 , gltexcoord 1. 1. , glcolor 1 1 1 1 , glvertex 0.5 0.5 ,
gltexcoord 0. 1. , glend , glpopmatrix;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 780 417 55 196617 floating $1;
#P newex 137 380 54 196617 s sketchup;
#P newex 800 200 45 196617 loadbang;
#P newex 808 327 62 196617 r rendrum;
#P newex 795 123 52 196617 r sketchup;
#P toggle 890 392 15 0;
#P newex 851 392 35 196617 sel 27;
#P message 834 417 68 196617 fullscreen $1;
#P newex 806 392 40 196617 key;
#P newex 780 438 217 196617 jit.window scam @depthbuffer 1 @floating 1;
#P window setfont "Sans Serif" 18.;
#P user jit.fpsgui 857 308 60 196626 0;
#P window setfont "Sans Serif" 9.;
#P newex 800 263 43 196617 jit.qball;
#P number 845 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 800 222 15 0;
#P newex 800 241 55 196617 metro 20;
#P newex 800 286 68 196617 t b erase b;
#P window linecount 2;
#P newex 795 148 262 196617 jit.gl.sketch scam @depth_enable 1
@antialias 1 @smooth_shading 1 @lighting_enable 1 @blend_enable 1;
#P window linecount 1;
#P newex 800 349 262 196617 jit.gl.render scam @antialias 1
@erase_color 0. 0. 0. 1.;
#P window setfont "Sans Serif" 12.;
#P window linecount 3;
#P comment 158 165 119 196620 * basic shape , ripped from .help file
to illustrate;
#P window setfont "Sans Serif" 9.;
#P window linecount 6;
#P comment 581 160 119 196617 ^^^^ fills a basic example pattern into
the first matrix – in the full patch these are dynamically generated
from midi input.;
#P window setfont "Sans Serif" 14.;
#P window linecount 5;
#P comment 740 480 271 196622 * on my system – latest M/M and Jitter
, win XP laptop , Intel GMA950 gpu – switching to fullscreen turns
off the texture , reporting a large number of errors in the max
window.;
#P window setfont "Sans Serif" 9.;
#P window linecount 8;
#P comment 696 160 102 196617 ————————> All of these
arguments obviously aren’t neccesary for this patch , but those are
the settings I am using in the full patch.;
#P window linecount 3;
#P comment 323 413 71 196617 ———–> Sends to jit.gl.render;
#P window linecount 1;
#P comment 520 143 97 196617 < ---------------;
#P user panel 376 126 312 396;
#X brgb 183 154 81;
#X frgb 255 255 255;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 791 105 187 92;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 791 199 187 184;
#X brgb 111 153 124;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 143 90 137 196617 *** Shape to texture ***;
#P connect 23 0 11 0;
#P connect 59 0 43 0;
#P connect 38 0 59 0;
#P fasten 38 0 42 0 392 341 518 341;
#P fasten 38 0 46 0 392 341 582 341;
#P fasten 12 1 10 0 834 324 805 324;
#P fasten 12 0 10 0 805 337 805 337;
#P fasten 24 0 10 0 813 347 805 347;
#P fasten 47 0 43 0 575 342 362 342;
#P fasten 21 0 22 0 856 409 888 409 888 389 895 389;
#P connect 12 2 17 0;
#P fasten 19 0 21 0 811 411 848 411 848 390 856 390;
#P connect 15 0 13 1;
#P fasten 22 0 20 0 895 411 839 411;
#P connect 16 0 12 0;
#P connect 13 0 16 0;
#P connect 14 0 13 0;
#P connect 25 0 14 0;
#P fasten 20 0 18 0 839 435 785 435;
#P fasten 27 0 18 0 785 435 785 435;
#P fasten 48 1 47 0 605 312 575 312;
#P connect 44 0 45 0;
#P fasten 49 0 45 0 486 470 560 470;
#P connect 53 0 44 0;
#P connect 56 0 48 0;
#P connect 37 0 36 0;
#P connect 39 0 37 0;
#P connect 40 0 39 0;
#P connect 41 0 40 0;
#P connect 51 0 52 0;
#P connect 51 0 50 0;
#P connect 51 0 35 0;
#P lcolor 2;
#P connect 51 0 41 0;
#P lcolor 2;
#P connect 35 0 34 0;
#P connect 33 0 38 0;
#P fasten 36 0 33 0 507 286 392 286;
#P connect 32 0 33 0;
#P connect 31 0 32 0;
#P fasten 34 0 31 0 405 239 392 239;
#P connect 50 0 31 0;
#P connect 52 0 29 0;
#P connect 28 0 26 0;
#P connect 29 1 28 0;
#P connect 29 0 28 0;
#P window clipboard copycount 60;


January 22, 2007 | 11:57 pm

Doh – Rookie mistake. *bangs head* "Remember the drawing context!" :-)

Thank you Wes, this is awesome – quick question:
The gltexcoord commands are doing my head in… am I right in seeing
that they only have an effect while using the texgen "viewspace" ? And
where can I find a description of the effect of the command?

All the cycling ’74 links to blue book and red book are dead as far as I
can tell, at least the ones in the html references and so on…? The
openGL people seem really intent on selling me a book, too…

Again, awesome – I really feel I’m learning like a son-uva-gun these days.
Thanks,
- Andreas.

the "@rectangle 0" isn’t technically Wesley Smith skrev:
> The biggest problem I noticed in your patch was the jit.gl.texture
> object had a context name of skal and all of the other objects were in
> context scam. I modified your patch a bit and it works for me on OSX
> at least. Note that I added some gltexcoord commands to you sketch
> command list to get the texture to show up.
>
> wes


January 23, 2007 | 12:04 am

You’re right that gltexcoord only has an effect in viewspace. I had
forgot about your envmap thing because it is loadbanged and I had
recreated the texture several times. Just search google for
gltexcoord for more info on it. If you doing envmap stuff, you don’t
need those extra gltexcoord commands.

wes

On 1/22/07, Andreas Wetterberg wrote:
> Doh – Rookie mistake. *bangs head* "Remember the drawing context!" :-)
>
> Thank you Wes, this is awesome – quick question:
> The gltexcoord commands are doing my head in… am I right in seeing
> that they only have an effect while using the texgen "viewspace" ? And
> where can I find a description of the effect of the command?
>
> All the cycling ’74 links to blue book and red book are dead as far as I
> can tell, at least the ones in the html references and so on…? The
> openGL people seem really intent on selling me a book, too…
>
> Again, awesome – I really feel I’m learning like a son-uva-gun these days.
> Thanks,
> – Andreas.
>
>
> the "@rectangle 0" isn’t technically Wesley Smith skrev:
> > The biggest problem I noticed in your patch was the jit.gl.texture
> > object had a context name of skal and all of the other objects were in
> > context scam. I modified your patch a bit and it works for me on OSX
> > at least. Note that I added some gltexcoord commands to you sketch
> > command list to get the texture to show up.
> >
> > wes
>
>


January 23, 2007 | 5:37 am

ih Andreas, this bit is taken from neha’s opengl tutorial which not only
premiere opengl but some c++ also…
" To properly map a texture onto a quad, you have to make sure the top right
of the texture is mapped to the top right of the quad. The top left of the
texture is mapped to the top left of the quad, the bottom right of the
texture is mapped to the bottom right of the quad, and finally, the bottom
left of the texture is mapped to the bottom left of the quad. If the corners
of the texture do not match the same corners of the quad, the image may
appear upside down, sideways, or not at all.

The first value of glTexCoord2f is the X coordinate. 0.0f is the left side
of the texture. 0.5f is the middle of the texture, and 1.0f is the right
side of the texture. The second value of glTexCoord2f is the Y coordinate.
0.0f is the bottom of the texture. 0.5f is the middle of the texture, and
1.0f is the top of the texture.

So now we know the top left coordinate of a texture is 0.0f on X and 1.0f on
Y, and the top left vertex of a quad is -1.0f on X, and 1.0f on Y. Now all
you have to do is match the other three texture coordinates up with the
remaining three corners of the quad. "

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06

i notices when applying this simple formula that the texture came lying on
its side, rotating hte texcoord in my sketch corrected this.

On 1/23/07, Wesley Smith wrote:
>
> You’re right that gltexcoord only has an effect in viewspace. I had
> forgot about your envmap thing because it is loadbanged and I had
> recreated the texture several times. Just search google for
> gltexcoord for more info on it. If you doing envmap stuff, you don’t
> need those extra gltexcoord commands.
>
> wes
>
> On 1/22/07, Andreas Wetterberg wrote:
> > Doh – Rookie mistake. *bangs head* "Remember the drawing context!" :-)
> >
> > Thank you Wes, this is awesome – quick question:
> > The gltexcoord commands are doing my head in… am I right in seeing
> > that they only have an effect while using the texgen "viewspace" ? And
> > where can I find a description of the effect of the command?
> >
> > All the cycling ’74 links to blue book and red book are dead as far as I
> > can tell, at least the ones in the html references and so on…? The
> > openGL people seem really intent on selling me a book, too…
> >
> > Again, awesome – I really feel I’m learning like a son-uva-gun these
> days.
> > Thanks,
> > – Andreas.
> >
> >
> > the "@rectangle 0" isn’t technically Wesley Smith skrev:
> > > The biggest problem I noticed in your patch was the jit.gl.texture
> > > object had a context name of skal and all of the other objects were in
> > > context scam. I modified your patch a bit and it works for me on OSX
> > > at least. Note that I added some gltexcoord commands to you sketch
> > > command list to get the texture to show up.
> > >
> > > wes
> >
> >
>


January 23, 2007 | 7:44 am

yair reshef skrev:
> ih Andreas, this bit is taken from neha’s opengl tutorial which not
> only premiere opengl but some c++ also…
> …
Nice link, Yair – thank you. I found that you could actually get some
cool texture "FSU" effects by deliberately mismapping the texture
coordinates – good fun!

…now to go learn the skills to do it all with mathematics ;-)
Cheers,
‘Andreas.


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