Nevertheless, the picture is shown in my panda Window. However, it seems the image resolution is not as good as the original .png file, which looks not very good.
By default, Panda3D will automatically rescale any texture image down to the nearest smaller power of two when you read it from disk, so you usually don’t have to think about this–but your application will load faster if you scale your textures properly in the first place.
If you would like Panda3D to rescale your images up to the next larger power of two instead of down to the next smaller power of two, use:
Thank you, but I have some problem in changing my config.prc file.
I use load_prc_file_data("", "direct-gui-edit 1");
However, it seems not work at all. I can use it in python, but I don’t why in C++ it is wrong.
Besides, I use textures-power-2 up
it seems no change occurred.
I don’t ensure if I have changed the config successfully.
Besides, I use load_prc_file_data("", "fullscreen true");
it is worked as expected.
Finally, I directly open the Config.prc file as .txt file, and modify it, but only the fullscreen true is effective. direct-gui-edit seems not work even I have changed its value to 1 in the Config.prc file.
You need to ensure that it is called before the first window is opened. I think you will want to try setting it to none to see if the scaling is the issue here at all.
direct-gui-edit has no effect in C++ because DirectGui is a Python-only feature, sorry.
thank you rgb, I’m sure that load_prc_file_data is called before the first window.
But I don’t ensure what do you mean that setting what to none?
(I’m sorry actually I can try it, but I worry that I can’t distinguish whether the error is caused by my codes or some configurations)
can you tell me the specific codes?
Is that load_prc_file_data("", "textures-power-2 none"); ?