Make sure you understand how this works before asking for additional features! Look up any keywords or functions you do not understand in the Reference!
You can make the code in draw less complicated by putting the code (for making images and surfaces and assembling them into a cube) into their own functions. By moving the code from @TfGuy's example around, I'm able to extend it into a cube without repeating everything six times -- plus now it can be used to put different text on different cubes, or to put text on other shapes, etc.
Answers
write to a PGraphics off-screen buffer using text. use that as your texture.
I'm a newbie here... How do I do that?
First you will need a PGraphics object to work with.
Then you will need to create it.
Now draw something on it. Don't forget to use beginDraw() and endDraw()!
Now you just need to use what you just drew as a texture.
Then draw your 3D cube like normal, specifying the texture coordinated in your calls to vertex().
All of the above can be explained by looking things up in the reference.
Working demo:
Make sure you understand how this works before asking for additional features! Look up any keywords or functions you do not understand in the Reference!
Woah! That's complicating! But thanks anyways!
Also see more on how vertex works here: https://processing.org/reference/vertex_.html
You can make the code in draw less complicated by putting the code (for making images and surfaces and assembling them into a cube) into their own functions. By moving the code from @TfGuy's example around, I'm able to extend it into a cube without repeating everything six times -- plus now it can be used to put different text on different cubes, or to put text on other shapes, etc.