Colors not working when applying texture to jit.gl.mesh

Apr 3, 2013 at 1:46pm

Colors not working when applying texture to jit.gl.mesh

Hi,

I would really need that transparency would work but it seems that none of the colors work when applying texture to a mesh? It works ok on the gridshape…what do I have to do because I need a mesh?

– Pasted Max Patch, click to expand. –
#67496
Apr 3, 2013 at 1:54pm

PS: And sometimes colors work on mesh while sometimes just don’t, even when not using texture at all. And I just can’t figure out what is the case…

#242860
Apr 3, 2013 at 3:53pm

the jit.gl.gridshape is passing color values in it’s output matrix (the last 4 planes of the 12 plane output matrix).
matrix color values will override any ob3d color values for gl.mesh.

the solution is to either set the color on the gl.gridshape, or clamp off the the last 4 planes of the output matrix by placing a [ jit.pack 1 @jump 8 ] between the gl.gridshape and gl.mesh.

more info can be found in the OpenGL Matrix Format reference page.

#242861
Apr 3, 2013 at 6:42pm

Thanks a lot Rob for clearing that up for me! Now it all makes sense…

#242862

You must be logged in to reply to this topic.