Image to NiftyImag

Hello,

i want to display a material texture in a nifty image element

i found on the forum somethign like this

[java]
assetManager.addToCache(new AssetKey(“pippo”), texture);
NiftyImage img = nifty.getRenderEngine().createImage(“pippo”, false);
image.getRenderer(ImageRenderer.class).setImage(img);
[/java]

but the addToCache function has been removed

how can i achieve thiss ?

thx

ok i found it

for those interested :

NiftyImage img = new NiftyImage(nifty.getRenderEngine(),new RenderImageJme(texture));

1 Like

or just specify the image path, assetManager and nifty should do the rest :stuck_out_tongue:

<cite>@Setekh said:</cite> or just specify the image path, assetManager and nifty should do the rest :P

well , from the title of the thread, that’s not the point