Texture size

I’m using Panda 1.8.1 to play a video (like in media-player sample).
I read in the manual that textures must be power of two. That apply to a video ? i mean, if the video size must be power of two too or i can use a video in any size (ex. 518x325)?.


It’s preferable. Panda will create a black border around your video automatically to scale it up to the next power of two.

Many video cards nowadays have not a lot of trouble with non-power-of-two-textures, so if you don’t care about the very old cards, you can simply disable this feature:
panda3d.org/manual/index.ph … xture_Size

Thanks rdb.
With very old video cards you mean something older than nvidea FX 5200 for example?

I really couldn’t say from personal experience how well each individual card and driver handles non-power-of-two textures, sorry.

From the OpenGL wiki:

Though keep in mind that it’s not just a question of whether NPOT textures are supported, it’s also a question of how well they perform under it. If they implement it by just upscaling a texture at the driver side, then there is of course little benefit - especially if they do the upscaling less efficiently than Panda does (eg. every time it is bound).