Oh, now I see the images in your previous post. If it’s bothering you that the aspect ratio is not the same, you should apply a scale to the texture to correct it, or I’ve heard that you can pregenerate cards using egg-texture-cards as well (search the forums for that).
It’s just how that works in a 3D engine. A quad is generated with vertices in 0…1 range, and the texture is applied with the texture coordinates 0…1 matching to the quad UV coordinates 0…1.
Notice that in a 3D engine, a texture’s pixel coordinates don’t matter. Texture coordinates are in the 0…1 range, both width and height, regardless of the aspect ratio.
Neither does Panda3D. As I said, your image is unscaled.
[size=92](actually, that’s not 100% true, as it’s scaled in the X by 0.75 to compensate for the window’s aspect ratio, so Panda does even do an effort to counter-scale your images.)[/size]
I guess we could implement some kind of node in the 2d scene graph that automatically rescales to match one pixel, but I think there’s little use for such a feature, as game UI’s usually must be scalable.
On the other hand, it wouldn’t be hard to add that.
drwr, what do you think? We could provide a base.pixel2d (or so) that is reparented to base.a2dTopLeft and has a scale of (1/winwidth, 1/winheight) so that you just need to do image.setScale(imgwidth, imgheight) for it to have a pixel-perfect size.