Wednesday, September 5, 2012

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?

[...]
Read more: Constrained mode support

No comments:

Post a Comment