Constrained mode support

FlashPlayer 11.4 was released recently and now many more users will be able to use  hardware  3D-rendering in Flash. Earlier versions of FlashPlayer 11 support hardware rendering for devices   manufactured after 2008. The constrained mode extends this support to all devices released since 2005. For example, almost one third  of TankiOnline players will be able to use GPU rendering thanks to the constrained mode support. (Around two third of the players already have GPU support and less than ten percent still use the old version of the Flash player that doesn’t support hardware rendering at all) Incidentally, your application should be ready to work in constrained mode as well as FlashPlayer on the user side. This is easy to achieve with Alternativa3D 8.32.

How does it work?

In order to make your application work in constrained mode you just should set the second parameter of stage3D.requestContext3D() when requesting the context, in the following way:

stage3D.requestContext3D(Context3DRenderMode.AUTO, Context3DProfile.BASELINE_CONSTRAINED);

Context3DProfile class appears with API of the 11.4 version of FlashPlayer so you need to update your playerglobal.swc (or use hardcoded string constant – "baselineConstrained");

If you wish to enable constrained mode only if normal hardware rendering is unavailable, you can request the context as usual then check which mode is set and, if after you receive it, the software rendering mode is set, you should request the context again, this time in constrained mode.

What do you get with Alternativa3D in Constrained mode?

Many things work in the Constrained mode as usual. Meshes, skins, animation and things like that. However some featured had to be removed due to compatibility issues. Constrained mode has stronger restrictions to complicity of one shader. So in cases of complex shaded surface Adobe gives you two options: divide complex shader into simpler ones in order to render them within a few passes or just simplify the complex shader. Since constraint mode is mostly used by slower GPUs, we chose the latter option. Therefore our complex materials will work like texture material or LightMapMaterial (if light map was assigned).

One thought on “Constrained mode support

Leave a Reply