OnscreenImage's resolution [SOLVED]

Hi guys,

I am facing a problem with OnscreenImage resolution, i mean, I’m building a GUI, and a background image that i am using loses a lot of definition, take a look:

The image at the left is the image rendered in any image editor, and the image at the right is the same image in Panda3D, and it’s clear that this image insede Panda render is losing a lot of definition.

The window is configured at 1280 x 720, in the config file, which btw are the same dimensions of the image. And the piece of code that loads the image is the follow:

self.screenBg = OnscreenImage(image = '../Texturas/GUI/mainScreen_02.jpg',
                                      scale=(1280/base.win.getXSize(), 1, 720/base.win.getYSize()),
                                      pos = (0,0,0),
                                      parent=render2d )

Does someone knows how can i improve this image resolution in Panda render?


unless you explicitly force your graficcard into using non-power-of-2-textures. your texture (and thus your image) should be a power-of-2-size.
for example 256x256 or 512x1024 … or in your case maybe even 2084x2084. or 1024x1024
you could also try to enable non-power-of-2-textures in your config.prc

I don’t recommend non-power-of-2-textures in your config.prc. On some cards it really kill performance. So don’t shoot yourself in the foot - fix the image to be power of 2.

ohh shut! I can’t believed I forgot something that obvious! thanks guys!