Hello,
I'm wondering how I can write some text on a given texture (during execution) ?
I'm using the java3d API.
Thanks !
Hello,
I'm wondering how I can write some text on a given texture (during execution) ?
I'm using the java3d API.
Thanks !
I believe you can fetch your texture's ImageComponent from the getImage or getImages methods, cast them to ImageComponent2D (if you can), then call the getImage method on them to get access to the BufferedImage object which finally gives you access to a Graphics object for text drawing.
You will probably have to do this for every MIP level, or regenerate the lower levels from the highest level every time you change it.
Alternatively, if you're not going to be updating the texture very frequently, you should be able to just create and apply a new texture from an Image every time you need to using the TextureLoader.