これで動作しましたが、Flash IDE ではなく、スタンドアローンと [Create Projector] メニューからプロジェクターを作成しました。最新のフラッシュを使用してパネルを表示することができました。
コンパイラ設定: -swf-version=16 -use-gpu=true
// stage3D + パネルを表示するテスト final public class Test extends Sprite {
private var cam:Camera;
private var video:Video = new Video();
public function Test():void {
var stage3D:Stage3D = stage.stage3Ds[0];
stage3D.addEventListener(Event.CONTEXT3D_CREATE, handleContext);
stage3D.requestContext3D();
trace(cam.name);
}
/**
* @private
*/
private function handleContext(e:Event):void {
var stage3D:Stage3D = stage.stage3Ds[0];
var context:Context3D = stage3D.context3D;
context.configureBackBuffer(stage.stageWidth, stage.stageHeight, 0, true);
context.clear(0,0,0,1);
context.present();
Security.showSettings(SecurityPanel.CAMERA);
cam = Camera.getCamera();
cam.setMode(640,360,30);
video.attachCamera(cam);
// change to upload via texture instead
addChild(video);
}
私の経験では、特定の GPU API を使用しない限り、ハードウェア アクセラレーションの向上はごくわずかです。私の経験では、カメラは代わりに加速され、特定の種類のビデオ解凍のみが行われました。Stage3D を使用していない場合、おそらく目に見える効果は得られません。