Forums > Jitter

weird behavior of jit.matrix.getcell() / gl.color

June 9, 2006 | 8:41 am

There is something strange going on with getcell() in js. m_The following
code always results in color [1., 1., 1., 0.]

tmp = alphamatrix.getcell(j, i);
myglobject.color = [1., 1., 1., tmp.];

While this gives the output as expected:

tmp = alphamatrix.getcell(j, i);
myglobject.color = [1., 1., 1., tmp/1.];

I’ve tried it with both char and float32 matrices. If I post the tmp value
to the maxwindow it’s always correct. To me it looks like something is wrong
with the automatic type casting when setting the objects color. (??) I’m
mystified.

-Thijs


Viewing 1 post (of 1 total)