Godfather
Godfather

Reputation: 1129

Can we have more than 4 stage3Ds in flash?

I can't seem to find a way to get more than the initial set of 4 stage3Ds provided by flash.

I have tried instantiating a new one using it's constructor and then adding it to the stage by simply pushing it to the list

stage.stage3Ds.push(new Stage3D());

but this doesn't seem to be working as my eventListener for the Event.CONTEXT3D_CREATE is never called (it is if I use one of the default Stage3Ds.

Does anybody have a workaround or a way to accomplish this?

Thanks

Upvotes: 0

Views: 333

Answers (1)

weltraumpirat
weltraumpirat

Reputation: 22604

From the Adobe documentation:

Stage3D provides a high-performance rendering surface for content rendered using the Context3D class. This surface uses the graphics processing unit (GPU) when possible. The runtime stage provides a fixed number of Stage3D objects. The number of instances varies by the type of device. Desktop computers typically provide four Stage3D instances.

So: No. And you shouldn't assume you'll always have four at your disposal, either - there might be less.

Upvotes: 2

Related Questions