I have some custom graphics that are created dynamically at run time with buffered images. I used the awtloader to load them into a texture.image file
AWTLoader imgLoader = new AWTLoader();
Image load = imgLoader.load(off_Image, true)
I’m stuck at this point. When you create a new JME picture it ask to load the image from a file. However I have the image stored in memory. What would be the best way of converting this over to a JME Picture. I need a Picture type not a texture type. I want to load the image into the guiNode. Thanks for any help.
Nothing is rendered. Basically I’m trying to get the image that was drawn into the Picture object. Everything I have is currently based off Picture so I need to either figure this out or rewrite my entire code. I’d rather figure this out.
Geometry test = new Geometry("myPic", new Quad(500, 500));
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.setTexture("ColorMap", new Texture2D(load));
test.setLocalTranslation(50, 50, 0);
If it were up to me it would be removed completely… but that would probably break quite a few folks.
I do think tutorials shouldn’t use it. As I said, it hides the parts a user should know and exposes a bunch of useless crap that hides what it’s really doing. Personally, I think the Geometry approach is simpler, less code, and teaches you something you can use again and again.