set pixels

jirko's icon

I´m looking for an equivalent to the "set(x, y, color)" command in proccesing. Basically it changes the color of any pixel.

Thanks

Bas van der Graaff's icon

Are you using OpenGL or just outputting a matrix to a window?
In OpenGL you can use a number of ways to draw pixels, look in gl_commands of jit.gl.sketch.
When using matrixes, you can always use the setcell message to matrix. But I don't think it's very efficient when you coloring lots and lots of pixels.

jirko's icon

thanks.
I´m trying to set a pixel with this command "gldrawpixels foo 200 200 2 2" to jit.gl.sketch but I get an error.