Cull/Draw and base.saveCubeMap()

Dear all -

Using the threaded pipeline “Cull/Draw” makes apparently the base.SaveCubeMap() method bug:

  File "xxxx\CrashTests\CrashTests.py", line 174, in SaveCubemap
    base.saveCubeMap("#.png",False)
  File "xxxx\PandaSDK\Panda3D-1.9.0-x64\direct\showbase\ShowBase.py", line 2517, in saveCubeMap
    source = tex)
  File "xxxx\PandaSDK\Panda3D-1.9.0-x64\direct\showbase\ShowBase.py", line 2453, in screenshot
    saved = source.write(filename, 0, 0, 1, 0)
AssertionError: do_has_ram_mipmap_image(cdata, n) at line 3719 of c:\buildslave\
sdk-windows-amd64\build\panda\src\gobj\texture.cxx

See attached the code snippet. saveCubeMap() works perfectly with the same code without any threaded pipeline or with ‘/Draw’ threaded pipeline only.

Using 1.9.0 (official build from the Download page)

Any idea? Many thanks!
Cull_Draw and SaveCubeMap.txt (6.42 KB)

Thank you. I’ve checked in a fix, which will be part of the 1.9.1 release.

To work around this in your local build, you can edit ShowBase.py, and change the relevant part in saveCubeMap and replace these two lines:

        self.graphicsEngine.openWindows()
        self.graphicsEngine.renderFrame()

With these:

        self.graphicsEngine.openWindows()
        self.graphicsEngine.renderFrame()
        self.graphicsEngine.renderFrame()
        self.graphicsEngine.syncFrame()

Many thanks rdb: it perfectly works.

Btw, I saw you posted a fix on saveSphereMap too,but doesn’t the base.screenshot() method need to be updated as well? After a few testing, it seems this method doesn’t work with Cull/Draw.

Many thanks again