pmp-p / pydk

An universal Python/pip+Panda3d build framework for Pythons Everywhere ( and Everyone )
https://github.com/pmp-p/pydk
MIT License
41 stars 4 forks source link

Cannot instantiate Showbase #4

Closed rowend36 closed 4 years ago

rowend36 commented 6 years ago

There seems to be another error when I try to import Showbase. ? libmultify.so ? libpzip.so ? libinterrogate.so ? libinterrogate_module.so ? libpunzip.so ? libparse_file.so ? libtest_interrogate.so Traceback (most recent call last): File "test1.py", line 5, in game=Window() File "test1.py", line 4, in init ShowBase.init(self) File "/data/data/u.r/usr/lib/python3/direct/showbase/ShowBase.py", line 388, in init if info:info(self,"Android found, will try to reuse main window") NameError: name 'info' is not defined

I tried commenting out the affected lines since they were just logging functions. Then, I got a second error.

Traceback (most recent call last): File "test1.py", line 5, in game=Window() File "test1.py", line 4, in init ShowBase.init(self) File "/data/data/u.r/usr/lib/python3/direct/showbase/ShowBase.py", line 390, in init if not hasattr(RunTime,'showbase'): NameError: name 'RunTime' is not defined

I'm not very conversant with the panda3d engine(only started using it when I saw this project) but a missing "Runtime" seems like a major issue. Neither "Runtime" nor "info" appear in the official panda3d repo and going through ShowBase.py, there seems to be no explicit import statement. I also searched this repository but no breakthroughs.

pmp-p commented 6 years ago

showbase is about to be refactored as said here, https://www.panda3d.org/blog/, on the other hand dealing with app lifecycle and python hooks would require some magic/work, that's why i offered to send you alpha quality code in the future : i have a showbase refactored for mdi-window and a sort of android "runtime" skeleton based on async/await but that's just very experimental stuff that will not be maintained, guidelines are not discussed yet neither on panda or cpython sides.

pmp-p commented 4 years ago

Panda3D now loads fine, to get standard ShowBase running well, only GLES context must be initialized via C or C++, an example showing how to do that with JNI will soon be available.