I try to just display texture on the screen, for ex: to display texture “abc.png” at position 3.3, 2.2 on the screen.
I previously used Button, but this time i want to just display the image, i do not need the interaction.
I looked into PGItem, but it doesn’t seem to accept textures. I appreciate a lot any hints!
Also is there any way to use the alpha of the png… i want to have 2 images one over the other, and see both using the transparency.
You can pass texture files to wfx.load_model, a quad will be returned that can be reparented to render2d.
You can enable the alpha of the texture by specifying set_transparency(1) on the NodePath.
I’m a bit confused, is this c++?
At this point i do the following:
tex = TexturePool::load_texture(“img.png”);
PT(PandaNode) readyCard = cm.generate();
path.set_texture( tex );
how should i do the re-parenting?
Your approach works as well. You just need to call path.reparent_to(window->get_aspect2d()) or so.
That works well.