Hi!!!
I’m trying to do something using GeoMipTerrain, and I get an error when calling the “generate” method. I gave a look at the sources, and I realized that the weird error only happens when using some method present at “geomipterrain.cxx”. When calling any inline method it seems to work.
The error: (when calling: terrain->generate();)
Did I forgot some lib? What’s necessary to run GeoMipTerrain???
I create the object sucessfully, and call its inlines methods having no problems.
terrain->get_root().set_sz(20.0); // no error (is in .I)
terrain->set_factor(100.0); // no error (is in .I)
terrain->generate(); // error - (is in geomipterrain.cxx)
terrain->get_elevation(40.0, 50.0); //error (is in geomipterrain.cxx)
It should be in libpanda. Did you link to libpanda.dll or libpanda.so?
If you did, you might have an old version of Panda3D. What version do you have? Did you compile Panda3D yourself or did you use a pre-built binary?
In the pre-built binaries, as of Panda3D 1.5.1, it is included.
…a temporary solution could be to make all the functions inline.
I’m confused. If it’s usable from python, why wouldn’t it be from C++?
Can you try importing GeoMipTerrain from python code and see if that works?
Do you maybe have an older version of Panda3D interfering? Any downloadable binary of version Panda3D 1.5.1 and higher should be equipped with GeoMipTerrain.
I’m 100% sure it’s really libpanda containing the geoMipTerrain.
Can you try this to see whether python can find it:
python -c 'import libpanda as l;print dir(l).count("GeoMipTerrain")'
1
Or list the symbols:
$ nm libpanda.so | grep -i geoMipTerrain | grep -i generate
016f3404 d Dtool_GeoMipTerrain_generate_79_comment
005f5cb0 t _Z31Dtool_GeoMipTerrain_generate_79P7_objectS0_S0_
005cbb30 T _ZN13GeoMipTerrain14generate_blockEttt
005d1150 T _ZN13GeoMipTerrain8generateEv
017764cc b _ZZ31Dtool_GeoMipTerrain_generate_79P7_objectS0_S0_E13key_word_list
Oh! That could be right indeed, nice find I guess I just forgot to add that when I submitted it.
I just checked in a fix to CVS, thanks for reporting this.