Away3D 4 - AIR3.4 Mac OSX - Blank screen - PC is fine?

Software: Away3D 4.x

Avatar
Darcey, Moderator
Posted: 05 October 2012 03:28 PM   Total Posts: 209

Hi,

Anyone know why a mac version of an Away3D 4 Application shows a blank screen where as the pc version running the same file works fine?

I’ve even created a test application with the bare minimum and on a mac it’s just a blank screen.

package
{
 
// -------------------------------------------------------------------------------------------------------------------------------
 
import away3d.cameras.Camera3D;
 
import away3d.containers.Scene3D;
 
import away3d.containers.View3D;
 
import away3d.debug.AwayStats;
 
import away3d.debug.Trident;
 
 
import com.darcey.debug.Ttrace;
 
 
import flash.display.Sprite;
 
import flash.events.Event;
 
import flash.geom.Vector3D;
 
import flash.utils.getTimer;

 
// -------------------------------------------------------------------------------------------------------------------------------
 
 
 
[SWF(frameRate="30",backgroundColor="#000000")]
 
// -------------------------------------------------------------------------------------------------------------------------------
 
public class Away3DAirTest extends Sprite
 {
  
// ---------------------------------------------------------------------------------------------------------------------------
  
private var t:Ttrace;
  
  
// Away3D4 Vars
  
public var scene:Scene3D;
  public var 
camera:Camera3D;
  public var 
view:View3D;
  private var 
move:Boolean false;
  private var 
lastPanAngle:Number 0;
  private var 
lastTiltAngle:Number 0;
  private var 
lastMouseX:Number 0;
  private var 
lastMouseY:Number 0;
  
  
// Helpers
  
private var stats:AwayStats;
  private var 
trident:Trident;
  
// ---------------------------------------------------------------------------------------------------------------------------
  
  
  
  // ---------------------------------------------------------------------------------------------------------------------------
  
public function Away3DAirTest()
  
{
   
// Setup scene
   
scene = new Scene3D();
   
   
// Setup camera
   
camera = new Camera3D();
   
camera.500;
   
camera.lens.far 500000;
   
   
// Setup view
   
view = new View3D();
   
view.scene scene;
   
view.camera camera;
   
view.antiAlias 1;
   
addChild(view);
   
   
trident = new Trident(200,true);
   
view.scene.addChild(trident);
   
   
// Setup swf resize handler
   
stage.addEventListener(Event.RESIZEresizeHandler);
   
   
stage.addEventListener(Event.ENTER_FRAME,renderHandler);
  
}
  
// ---------------------------------------------------------------------------------------------------------------------------
  
  // --------------------------------------------------------------------------------------------------------------
  
private function resizeHandler(e:Event):void
  {
   view
.width stage.stageWidth;
   
view.height stage.stageHeight;
  
}
  
// --------------------------------------------------------------------------------------------------------------
  
  
  // ---------------------------------------------------------------------------------------------------------------------------
  
private function renderHandler(e:Event):void
  {
   camera
.Math.sin(getTimer()/1000)*500;
   
camera.Math.cos(getTimer()/1000)*500;
   
camera.lookAt( new Vector3D(0,0,0) );
   
view.render();
  
}
  
// ---------------------------------------------------------------------------------------------------------------------------
  
 
}
 
// -------------------------------------------------------------------------------------------------------------------------------
   

Avatar
Darcey, Moderator
Posted: 05 October 2012 03:35 PM   Total Posts: 209   [ # 1 ]

renderMode tried: gpu and direct (both work on pc blank screen on mac)

depthAndStencil is set to true, same result, fine on pc nothing on mac.

   

Avatar
Darcey, Moderator
Posted: 05 October 2012 03:54 PM   Total Posts: 209   [ # 2 ]

Just tried it with compiler arguments usual -13 etc, still no joy.

Mac displays stats:
FR 29/30
RAM: 9.0M/9.0M (never changes)
POLY: 222
DRV: OpenG

Modified code to but still nothing on a mac osx air installed application?

package
{
 
// -------------------------------------------------------------------------------------------------------------------------------
 
import away3d.cameras.Camera3D;
 
import away3d.containers.Scene3D;
 
import away3d.containers.View3D;
 
import away3d.debug.AwayStats;
 
import away3d.debug.Trident;
 
 
import com.darcey.debug.Ttrace;
 
 
import flash.display.Sprite;
 
import flash.display.StageAlign;
 
import flash.display.StageScaleMode;
 
import flash.events.Event;
 
import flash.geom.Vector3D;
 
import flash.utils.getTimer;

 
// -------------------------------------------------------------------------------------------------------------------------------
 
 
 
[SWF(frameRate="30",backgroundColor="#000000"width="500",height="500")]
 
// -------------------------------------------------------------------------------------------------------------------------------
 
public class Away3DAirTest extends Sprite
 {
  
// ---------------------------------------------------------------------------------------------------------------------------
  
private var t:Ttrace;
  
  
// Away3D4 Vars
  
public var scene:Scene3D;
  public var 
camera:Camera3D;
  public var 
view:View3D;
  private var 
stats:AwayStats;
  private var 
trident:Trident;
  
// ---------------------------------------------------------------------------------------------------------------------------
  
  
  
  // ---------------------------------------------------------------------------------------------------------------------------
  
public function Away3DAirTest()
  
{
   
// Setup class specific tracer
   
= new Ttrace(true,"",true,false);
   
t.ttrace("Away3DAirTest()");
   
   
stage.scaleMode StageScaleMode.NO_SCALE;
   
stage.align StageAlign.TOP_LEFT;
    
   
   
// Setup scene
   
scene = new Scene3D();
   
   
// Setup camera
   
camera = new Camera3D();
   
camera.500;
   
camera.lens.far 500000;
   
   
// Setup view
   
view = new View3D();
   
view.width 400;
   
view.height 400;
   
view.scene scene;
   
view.camera camera;
   
view.antiAlias 1;
   
addChild(view);
   
   
trident = new Trident(200,true);
   
view.scene.addChild(trident);
   
   
stats = new AwayStats(view);
   
addChild(stats);
   
   
// Setup swf resize handler
   
stage.addEventListener(Event.RESIZEresizeHandler);
   
   
stage.addEventListener(Event.ENTER_FRAME,renderHandler);
   
   
addChild(t);
   
   
t.ttrace("Away3DAirTest.Away3DAirTest(): view = " view);
   
t.ttrace("Away3DAirTest.Away3DAirTest(): camera = " camera);
   
t.ttrace("Away3DAirTest.Away3DAirTest(): trident = " trident);
   
t.ttrace("Away3DAirTest.Away3DAirTest(): view = " view);
  
}
  
// ---------------------------------------------------------------------------------------------------------------------------
  
  // --------------------------------------------------------------------------------------------------------------
  
private function resizeHandler(e:Event):void
  {
   
//t.ttrace("Away3DAirTest.resizeHandler(e)");
   
   
view.width 400;
   
view.height 400;
  
}
  
// --------------------------------------------------------------------------------------------------------------
  
  
  // ---------------------------------------------------------------------------------------------------------------------------
  
private function renderHandler(e:Event):void
  {
   
//t.ttrace("Away3DAirTest.renderHandler(e)");
   
   
   
camera.Math.sin(getTimer()/1000)*500;
   
camera.Math.cos(getTimer()/1000)*500;
   
camera.lookAt( new Vector3D(0,0,0) );
   
view.render();
  
}
  
// ---------------------------------------------------------------------------------------------------------------------------
  
 
}
 
// -------------------------------------------------------------------------------------------------------------------------------
   

Avatar
Darcey, Moderator
Posted: 05 October 2012 04:12 PM   Total Posts: 209   [ # 3 ]

Just tried the dev branch of away3d, same result :(

hmmmmm….

   

Avatar
Darcey, Moderator
Posted: 05 October 2012 04:35 PM   Total Posts: 209   [ # 4 ]

Just found a few other MACs to try it on and it appears to work on some and not others… No errors at all…

   

dlx, Newbie
Posted: 26 November 2012 12:47 AM   Total Posts: 12   [ # 5 ]

Any update on this ?
I have the same issue, a empty screen (except for the AwayStats) on any Mac OS device…
I’m using the latest Away3d rev. + AwayPhysics, with the Stage3DProxy feature to share the stage3d context with the Starling lib…
thanks for your help!

dlx

   

Avatar
Darcey, Moderator
Posted: 26 November 2012 03:09 AM   Total Posts: 209   [ # 6 ]

I never got it to work on those macs… Something about a divide by zero hardware issue on them… I tried release branch, dev branch and older versions of Away3D 4 and none of them displayed anything. I’m guessing by the info that I found googling that it’s a hardware issue on older mac’s.

My findings building the project:
1. Adobe Air - File System handling is not 1 piece of code for both pc and mac, I had to write specific routines for pc and mac.

2. Away3D 4 - Blank screen issue on random mac’s - no sollution/fix found.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X