No persistent frame buffer for view3D

Hi,
I am working on a 3D project, and I have found an unexpected behavior of Away3D: in the AS3 version I didn’t need to render view3D at each frame, if the game was in an idle state I could simply inhibit the render callback to keep the previously rendered 3D scene behind the animated 2D items.
Now on Openfl, to continue seeing the 3D scene I need to render it at each frame otherwise the (3d) scene goes black.
Is there a way to avoid the frame buffer deletion and update it only when needed?

I am working on the latest libs, targetting HTML5 (on Chrome).

I have heard mixed answers about whether performance would work alright if we used a framebuffer for Stage3D. Does anyone have an opinion on this?

My use-case is particular, the game uses both 3d and 2d animations, and 3d ones are not always needed, in most part of the interaction they don’t need to be updated.

If you want Away3D to be a faithful convertion of the AS one it should use a frame buffer, otherwise it could be enabled by adding a property to view3d.renderer. i.e. view3d.renderer.frameBuffer -> true/false (or simply view3d.frameBuffer), what do you think? Is there any kind of problem in keeping a separate framebuffer for view3D/stage3D?

1 YES vs 0 NO
:rofl:

Oh, another good reason to restore the framebuffer is that I am using a high definition texture as background (as view3d background property), that looks very heavy to redraw (as happened on AS3), and when I don’t need updates in the 3D scene it is a useless CPU killer.

But, what are the concerns about performance if adopting a framebuffer for stage3D? Video memory flooding?

I thought we had looked into this in the past, that using a fullscreen framebuffer for Stage3D would hurt performance too much to consider using it.

It would make some APIs easier, but I think it kills performance on mobile

Isn’t it a simple memory area as large as a fullscreen image? In which way would kill performance on mobile?
Is Away3D rendering to a renderbuffer or something instead of a framebuffer?

I think the best solution would be to add the possibility to enable/disable the frame buffer, to allow action games to save memory, and static games to save CPU and battery: is this difficult to implement?

PS.: currently the view3D background has bad scaling… maybe because it is not resampled on a framebuffer?