Loading POT Rectangular Testures

I am unable to load a rectangular texture which is POT (power-of-two), however it is not square in size.
The following texture in size 1024x512 px doesn’t load.
If the texture is square, e.g. 1024x1024 it does load correctly.
This was tested on Android, but it might be that it affects other platforms, too.

mat.setTexture(“DiffuseMap”, assetManager.loadTexture(“textures/test.png”));

If there is a validation for POT, it should be done individually on each coordinate. The vertical and horizontal size should not be validated for equality. As far as i know, there is no openGL requirement for both texture coordinate sizes to be equal. Only that each coordinate size should be POT in size.

Btw, how can I correct typos? I don’t see an edit button… :oops:

add /edit to the end of the url.

And… thems are some mighty large textures for an android app. The PoT textures should work fine… what device are you using?

The texture sizes work quite fine even on Android. I haven’t had troubles with single objects and textures up to 2048x2048. The total size is not the issue here.
I have tested square textures on 2 devices on Android 4.0 and 4.2.2. While square textures work fine, the rectangular textures do not.

Is there any validation in place in jME3?
I do not believe this is device related as the same rectangular textures work with earlier versions on jME3 (I have used version 2012-05-25 to compare).

And thanks for the quick answer.

Sorry… I was kidding about the texture size.

Um… I’m not having an issue with rectangular Images on my tablet. What format are they in? I always tend to use PNG’s… perhaps it’s an issue with a particular file type?

What version of JME are you running now? When “earlier version” is 1.5 years old, I thought it worth asking as that’s quite a ways back to go for “earlier”.

I am using .png. Haven’t tried other file types. Will post later with some test results.

As for “way back”: indeed it’s quite an old version. However, that it works shows that the incompatibility most probably is not with the device.
Currently I am using nightly 2013-11-07 and also tried with nightlies between 2013-09-10 and 2013-11-03, all with the same issue.

Here are the test results with jME3 2013-11-07 and .jpg textures:

  • test.jpg 512x512 - ok, texture is loaded.
  • test2.jpg 1024x512 - not ok, texture is not loaded.

Can you psot more information about your device? At least by specifications they are not expected to support any texture size, I think you can query it somewhere with one of the GL11.getInteger()? commands, and resize to largest allowed on the fly.

One of my devices is an LG P970, supports ES 2.0 GLSL 1.0,

GL Config:

EGL Config: