Open 62316e opened 9 years ago
Fixed by adding same code into Stage3DProxy.as::onEnterFrame method if (_snapshotRequired && _snapshotBitmapData) { _context3D.drawToBitmapData(_snapshotBitmapData); _snapshotRequired = false; }
I'm having the same issue. Did you need to add the whole queueSnapshot function to Stage3dProxy as well? Or should it still be called by the renderer?
I did and got 'Error: Error #3692: All buffers need to be cleared every frame before drawing.'
Thats my Stage3DProxy.as
private function onEnterFrame(event:Event):void { if (!_context3D) return;
// Clear the stage3D instance
clear();
//notify the enterframe listeners
notifyEnterFrame();
if (_snapshotRequired && _snapshotBitmapData)
{
_context3D.drawToBitmapData(_snapshotBitmapData);
_snapshotRequired = false;
dispatchEvent(new Event("snapshotReady"));
}
// Call the present() to render the frame
present();
//notify the exitframe listeners
notifyExitFrame();
}
Oh thanks. Yeah I had the call after present();
What's listening for 'snapshotReady' ?
I made 'snapshotReady' for project purpose .
_stageView.stage3DProxy1.addEventListener("snapshotReady", onSnapshotReady); _stageView.stage3DProxy1.queueSnapshot(bmpSnapshot);
You just have to wait for a next frame (eg present)
Thanks.
It's coming back black, I'll have to work out why it's empty.
Hi,
RendererBase.as