loadImageAsPlane()

For the record, the 1.8.0 version of Panda supports a new mode:

textures-power-2 pad

which will add black borders as needed to frame the texture within a larger power-two texture. It is then up to your code to apply texture.getTexScale() where needed. This does, of course, prevent using repeated textures.

Also, I should clarify a minor misunderstanding in the above. These lines:

textures-power-2 none
textures-power-2 up

don’t tell Panda to try non-power-of-2, then fall back to scaling up. Instead, only the first line is read. If you want to try non-power-of-2 first then fall back, use these lines:

textures-auto-power-2 1
textures-power-2 up

David