I use TexturePool to load texture, like this :
Texture* tex = TexturePool::load_texture("my_file.png");
Then I use CardMaker to hold it. After that, I reparent to aspect2d. And… Low level image shows in my screen…
I use TexturePool to load texture, like this :
Texture* tex = TexturePool::load_texture("my_file.png");
Then I use CardMaker to hold it. After that, I reparent to aspect2d. And… Low level image shows in my screen…
Oh, I fixed:
None load texture by TexturePool
Load texture from PNMImage : http://www.panda3d.org/manual/index.php/Creating_New_Textures_from_Scratch
You should load textures like this:
PT(Texture) tex = TexturePool::load_texture("my_file.png");
There’s little point in using PNMImage to load a texture.