Brace yourselves .. The deadliest jME3 changes since alpha are here

The error happens because AssetLoaders for textures are supposed to return an Image object (not a texture object).

But once again I don’t understand why you’re doing this given that there’s a RenderImageJme constructor that takes a Texture2D.

1 Like

If he’s using XML to layout the screen then would he be able to pass in the RenderImageJme?

@Momoko_Fan said:
That's strange. Why is it compiling for GLSL ES? Did you change any of the settings?

@madjack: By the way, I returned the cache methods back into DesktopAssetManager, but I still recommend you reconsider using them.

I use eclipse with the svn repository of jmonkey and everything worked so far without any adjustment. Therefore, I have not changed any settings for opengl and thought that would be carried out by the graphics driver or from the engine. Perhaps jmonkey automatically uses the installed android-sdk and therefore the opengl / es variant? is it possible to configure jmonkey to use opengl instead of using opengl / es. sorry I've never worked with shaders.
@Momoko_Fan said:
But once again I don't understand why you're doing this given that there's a RenderImageJme constructor that takes a Texture2D.


As usual, @Momoko_Fan saves the day! Thanks. Got it working now. :D It's slightly convoluted to get there though, but it works.

That's how it goes:

From my RightPreview AppState.
[java]
gMgrs.getGuiManager().setRightPreviewImage(new RenderImageJme((Texture2D) getOutTex()));
[/java]

Then in GUI manager.
[java]
public void setListPreviewImage(RenderImageJme listPreviewImg) {
if (!isListImgSet) {
nifty.getCurrentScreen().findElementByName("listPreviewImage").getRenderer(ImageRenderer.class).setImage(new NiftyImage(nifty.getRenderEngine(), listPreviewImg)); //NOI18N
isListImgSet = true;
}
}
[/java]

Performance is about the same. Might be a tiny bit faster, but hard to tell. The main viewport plus 2 others = ~250-330 FPS.
1 Like

Any idea why all my textures are turned upside down? Till nightly build 14.04.2012 it works but with 17.04.2012 it’s flipped.



I’m using the the unshaded material definition if it helps. The rest is standard stuff. Loading Texture, setting Texture in Material.



I have seen already that you can use a TextureKey but it’s a little bit annoying that the standard way of loading changed ;).

@Momoko_Fan

Could you move line 356 in DesktopAssetManager into a Logger please?



[java]

public Texture loadTexture(String name){

TextureKey key = new TextureKey(name, true);

key.setGenerateMips(true);

Texture tex = loadTexture(key);

System.out.println(tex + " - " + tex.getMinFilter()); // <-- This one here.

return tex;

}

[/java]



Into something like:



[java]

logger.log(Level.INFO, “Loaded {0} with {1}”, tex + " - " + tex.getMinFilter());

[/java]



I can commit if needs be.

1 Like