actionscript-3flashactionscriptstarling-frameworkaway3d

Context3D not available when forcing software rendering in flash


I'm having a problem with fallback from GPU to SOFTWARE rendering. I want the .swf to work on machines that don't support GPU rendering and I have found that the following line forces the software rendering. After this though, it only works on the emulator after I compile it. (IDE is with IntelliJ).

_stage3DProxy = _stage3DManager.getFreeStage3DProxy(true);

After I did this change, my Starling and Away3D are using software rendering which I can see from Away stats and in trace for Starling.

The problem is that the .swf doesn't work on web or mobile device (AIR). It pops an error as if my descriptor were wrongly set... Error I'm getting:

Error #2044: Unhandled ErrorEvent:. text=Error #3702: Context3D not available.

The render mode is set to "wmode=direct" and depth and stencil to "true".

When force software rendering is disabled everything (Starling and Away3D) works as expected. But not when I force the Software rendering.

Any ideas?


Solution

  • Found the problem.

    After creating stage3DProxy, Starling and Away3D are being initialised, but with wrong params. The default values for profile (last param) were being set to "baseline extended" for Away3D and to "baseline" for Starling. After returning those to default values, stage3DProxy automatically does the fallback on machines with old GPU and uses software for rendering.