We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi need to find a way to load all points from the back face of the cube into array so i can change the colors and set the modified colors back on the face again. just like in C# where you get modifi single pixel on the screen.
can anyone tell me if it is posibel or do i need to create an image and then use beginShape with image as texture. it just seems power consuming like that.
Answers
Where I've done something like this I've written my own cube method that draws 6 individual squares.
beginShape method sounds like it might work though. Try it.
PGraphics will give you an addressable object with a pixels[] array. If you write your own cube object made of six images (six PGraphics) oriented in space, then you can read from them and write to them as you like.
beginShape with image as texture might work too -- I'm actually not sure.
These two links should be in your list to check:
https://processing.org/reference/texture_.html
https://processing.org/reference/textureWrap_.html
Then you just need to modify the texture that you are setting in the back face of the cube.
Kf