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

Jun 9, 2006 at 8:41am

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

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

#26349

You must be logged in to reply to this topic.