Skip to main content
Known Participant
February 27, 2012
Question

AIR 3.2 Hardware accelerated 2D

  • February 27, 2012
  • 3 replies
  • 2610 views

I'm a bit confused about todays announcement of AIR 3.2 for iOS. It says hardware accelerated 2D, but I thought that's what the GPU mode option was in Flash CS5.5 iOS options anyway?

This topic has been closed for replies.

3 replies

March 27, 2012

Hi,

I was wondering the same thing.

After reading up a bit, and as far as I have yet understood;

The difference is that with this concept/approach, you pre setup everything the GPU needs to be able to display your scene correctly and then pass everything to it.

This way it sortof runs standalone without the need of a lot of CPU ineraction.

With the Flash cpu/gpu option, you select whether or not the display routines/libraries will target the cpu or gpu for execution.

So instead of your swf calling the gpu continuesly(spelling?) at runtime, you pass it the works and say go.

I might be mistaken though.

Regards,

Mac

Participant
March 27, 2012

It boils down to how many draw calls the CPU has to make.

Normally if you use the display list, the flash player makes "smart" decisions based on what needs to be drawn, what's visible on the stage.

If you work with stage3D, you will be preparing a lot of vertex information per frame, but really only executing a few draw calls (depending on how smart your implementation is)

See http://www.bytearray.org/?p=4074 for details on super fast implementations and why they work.

Otherwise traditional CPU / GPU mode should still work fine for simple things, menus, HUDs.

http://www.mattlockyer.com

Participant
March 12, 2012

Ignore the blog post, here's what Adobe did.

The traditional display list (stage) can still be rendered using CPU or GPU mode depending on your requirements (normally Vector for CPU and bitmaps for GPU).

That said, Stage3D is a whole new rendering plane and you must use render mode DIRECT (thanks Colin).

Stage3D is a direct mapping from AS3 to OpenGL ES 2.0 on mobile devices, providing you with complete low level control over rendering triangles using shaders developed with the AGAL (Adobe Shader Language).

Frameworks like Starling are designed to mimic the traditional display list, but leverage the power of this new rendering context.

Read up a bit more and things should be clear.

http://www.mattlockyer.com

Colin Holgate
Inspiring
February 27, 2012

I think they are referring to Starling, which is where 2D objects can be blitted into Stage3D, which is handled by the GPU. So, in a sense it's a single layer that the GPU is accelerating, as opposed to normal AIR GPU, where each individual object is handled on its own.

Known Participant
February 27, 2012

So would that mean it's better now to select the GPU mode all the time now, regardless of game time. If you have a look at this...

http://blog.norbz.net/2012/02/a-look-at-air-3-2/#.T0u7NKjQjKQ.facebook

That looks like the drawing API to me, not bitmaps which is being accelerated, but I could be wrong.

Colin Holgate
Inspiring
February 27, 2012

I don't think it's automatic, you would only get the fast performance on things you had programmed using Starling. And then you would use a new mode, Direct, and not CPU or GPU.