Android: OpenGL ES 2.0 and NPOT

Hey guys,

First time poster. I started using jmonkey 3.0 a few weeks ago to create a game for Android.

As of last night I have run in to the problem that I want to be able to use existing (and maybe add) some post processing effects. However, currently there is no way to do that reliably due to the way that handles pushing the framebuffer texture to the GPU.

During initialization of the TextureUtil the member NPOT (bool determining support for non-power-of-2 textures) is set based on whether either the OES_texture_npot or if the Nvidia speicific npot extension is supported. However, this is insufficient for determining whether a framebuffer texture can be used.

It makes sense that NPOT is false when loading images, because they can then be scaled appropriately. However, when trying to use framebuffer textures the supplied OpenGL ES 2.0 npot support should be sufficient, since clamp to edges should work fine, and you don’t need any support for mipmapping here.

Is there some way to work around this that I am missing? If not, can I expect any fixes to be implemented? Does this need fixing at all?


JME post processing is not supported on android yet.

It will need a lot of adaptation i guess, especially on frameBuffers.

It’s not scheduled yet as it’s usually a framerate killer and android hardware don’t really need that to have a bad frame rate.

I’m really sorry but I’m afraid you’re gonna have either to wait, or look into it for yourself for now.

There are plenty things to do on the android side and this is not a priority.

Alright. If I work on a fix would you like me to post it back here?

1 Like

Of course, that would be very appreciated.

The current NPOT handling can be changed to only be applied on textures with mipmapping or repeat modes, I think that would be fine for both framebuffer textures and regular textures as well.

And yes, if you can add framebuffer support and the fix, it will be added to core.

Any news on this, @noticket?