2013-02-25 52 views
1
  • Flash Builder的4.7
  • 空氣SDK 3.5
  • 的Away3D 4.0.9黃金
  • 模擬器的iOS SDK(5.0,5.1,6.1)
  • iPhone 3GS的6.1
  • Android設備在2.3.6

我設法讓Flash Builder中,用Away3D測試移動版(iOS版,Android版)...
我不能在iOS模擬器中運行我的小測試,但是,我的代碼在Air Simulator中運行100%
我將renderMode設置爲GPU,Direct和Auto,在所有情況下,只有Air Simulator運行代碼
我錯過了什麼?
FlashBuilder Away3D中的iOS -

在調試錯誤顯示爲:

Error: Error #3613: The native shader compilation failed. 
    at flash.display3D::Program3D/upload() 
    at away3d.core.managers::AGALProgram3DCache/setProgram3D()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/core/managers/AGALProgram3DCache.as:98] 
    at away3d.materials.passes::MaterialPassBase/updateProgram()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/materials/passes/MaterialPassBase.as:363] 
    at away3d.materials.passes::DefaultScreenPass/updateProgram()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/materials/passes/DefaultScreenPass.as:659] 
    at away3d.materials.passes::MaterialPassBase/activate()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/materials/passes/MaterialPassBase.as:261] 
    at away3d.materials.passes::DefaultScreenPass/activate()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/materials/passes/DefaultScreenPass.as:515] 
    at away3d.materials::MaterialBase/activatePass()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/materials/MaterialBase.as:352] 
    at away3d.core.render::DefaultRenderer/drawRenderables()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/core/render/DefaultRenderer.as:152] 
    at away3d.core.render::DefaultRenderer/draw()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/core/render/DefaultRenderer.as:102] 
    at away3d.core.render::RendererBase/executeRender()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/core/render/RendererBase.as:288] 
    at away3d.core.render::DefaultRenderer/executeRender()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/core/render/DefaultRenderer.as:62] 
    at away3d.core.render::RendererBase/render()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/core/render/RendererBase.as:252] 
    at away3d.containers::View3D/render()[/Users/robbateman/Documents/fdt5workspace/away3d-core-fp11/src/away3d/containers/View3D.as:611] 
    at Testes/update()[/Users/lokovarrido/Documents/Adobe Flash Builder 4.7/Testes/src/Testes.as:41] 

我的代碼是:

package 
{ 
    import flash.display.Sprite; 
    import flash.events.Event; 

    import away3d.cameras.Camera3D; 
    import away3d.containers.View3D; 
    import away3d.entities.Mesh; 
    import away3d.materials.ColorMaterial; 
    import away3d.primitives.SphereGeometry; 

    [SWF(frameRate="60", width="100%", height="100%", backgroundColor="0x000000")] 

    public class Testes extends Sprite 
    { 

     private var cam:Camera3D; 
     private var view:View3D; 

     public function Testes() 
     { 

      cam = new Camera3D(); 
      cam.z = -350; 

      view = new View3D(null, cam); 
      addChild(view); 

      var sphere:SphereGeometry = new SphereGeometry(); 
      var sphereMaterial:ColorMaterial = new ColorMaterial(0xff0000); 
      var sphereMesh:Mesh = new Mesh(sphere, sphereMaterial); 
      view.scene.addChild(sphereMesh);  

      this.addEventListener(Event.ENTER_FRAME, update); 

     } 

     public function update(e:Event):void 
     { 
      trace("update"); 
      view.render(); 
     } 

    } 
} 

回答

1

在Adobe AIR應用程序描述XML,<initialWindow>下,設置depthAndStencil

<initialWindow> 
    <depthAndStencil>true</depthAndStencil> 
+0

thx ...使用renderMode直接工作... 如果我要使用renderMode gpu?有什麼建議嗎? – 2013-02-25 19:56:48