2

Direct rendering mode. What exactly is this used for? "Treating the entire frame as a Stage3D surface" does nothing for me. I hear reports that it is the "fastest" rendering mode, but in what way? Does it speed up vector processing, bitmap processing, or neither?

Would the old "GPU" tweaks (caching as bitmap) yield performance increases under this mode?

Also, where should the project be set to use direct rendering? There are two places the option is offered--the first in the AS3 language config and the second in the publishing menu.

user1649948
  • 651
  • 4
  • 12

1 Answers1

3

direct render mode is used with Stage3D. This is Adobes hardware accelerated set of API's that run in the browser through flash player and on desktop, iOS and Android through AIR.

When using Stage3D you essentially get a hardware accelerated stage that lives behind the traditional display list stage.

stage list

You cannot use the traditional Flash API's and have your content run on the GPU, programming directly on Stage3D is more similar to OpenGL programming. It requires the use of AGAL shaders and a specific set of API's.

http://www.adobe.com/devnet/flashplayer/articles/how-stage3d-works.html

There are however quite a few libraries designed to work directly with Stage3D. Content programmed with these libs will be hardware accelerated and take advantage of the huge performance boost.

Starling mimics the DisplayList API's and should be pretty familiar if you've done traditional Flash programming. There is also a UI Framework built on top of Starling called Feathers. I'm currently using this in a mobile application as an alternative to Flex Mobile for performance reasons.

There are also several 3D libraries that are designed for creating/working with 3D content. Check out Away3D or do a quick google search. This site also lists quite a few Stage3D frameworks:

http://www.adobe.com/devnet/flashplayer/stage3d.html

Here are some more links for more info:

http://gaming.adobe.com/ - info on Stage3D sdk's. Also includes download links for the newest Flash SDK's

http://www.bytearray.org/?p=2555 -Stage3D was called Molehill in the beta days

Getting started with stage3d in Flash CS5, and which framework to choose? -another stackoverflow question on the topic

Hope this helps

Community
  • 1
  • 1
francis
  • 5,889
  • 3
  • 27
  • 51
  • Interesting. I have already coded an app in Flash Pro CS6, but want to release it for mobile devices. Flash pro allows me to choose "Direct" in addition to "CPU" and "GPU", and doesn't throw errors during the content creation. I didn't use any special abstraction, just plain AS3. Is Flash Pro using Starling behind the scenes? Why would it offer and use the "Direct" mode when compiling if it didn't support it? – user1649948 Nov 09 '12 at 03:52
  • If you look at the graphic you see there is a normal Stage that lives on top of the Stage3D stages. Normal flash content will run fine alongside Stage3D it will just NOT be renderer on the GPU and will not see any hardware renderering performance increases. – francis Nov 09 '12 at 03:54
  • @user1649948 it is not using Starling behind the scenes. By selecting direct you have the ability to use Stage3D, it will not port existing content to the new API's – francis Nov 09 '12 at 03:56