Context3D not available: MacOS X

Software: Away3D 4.x

bruno.vieira, Newbie
Posted: 28 September 2012 12:23 PM   Total Posts: 1

Hi all,

I’m trying to build a simple object loader with away3D and FDT, but no matter how I change the code I always get a message saying Context3D is not available.

Here’s my code:

package  br.com.vieirawebstudio{
 import flash
.net.URLRequest;
 
import away3d.events.LoaderEvent;
 
import away3d.loaders.Loader3D;
 
import away3d.loaders.parsers.Parsers;
 
import flash.events.Event;
 
import away3d.containers.View3D;
 
import flash.display.Sprite;

 public class 
HelloAway3D extends Sprite {
  
  
private var _view:View3D;
  private var 
_loader:Loader3D;
  
  public function 
HelloAway3D() 
  
{
   trace
('Hello Away 3D');
   
_view = new View3D();
   
_view.backgroundColor 0x666666;
   
_view.antiAlias 4;
   
   
this.addChild(_view);
   
this.addEventListener(Event.ENTER_FRAMEonEnterFrame);
   
   
Parsers.enableAllBundled();
   
   
_loader = new Loader3D();
   
_loader.addEventListener(LoaderEvent.RESOURCE_COMPLETEonResourceComplete);
   
_loader.addEventListener(LoaderEvent.LOAD_ERRORonLoadError);
   
_loader.load( new URLRequest('PolarBear.awd') );
  
}
  
  
private function onEnterFrame(evEvent):void
  {
   _view
.render();
  
}
  
  
private function onResourceComplete(evLoaderEvent):void
  {
   _loader
.removeEventListener(LoaderEvent.RESOURCE_COMPLETEonResourceComplete);
   
_loader.removeEventListener(LoaderEvent.LOAD_ERRORonLoadError);
   
_view.scene.addChild(_loader);
   
trace('Complete loaded');
  
}
  
  
private function onLoadError(evLoaderEvent):void
  {
   trace
('Could not find'ev.url);
   
_loader.removeEventListener(LoaderEvent.RESOURCE_COMPLETEonResourceComplete);
   
_loader.removeEventListener(LoaderEvent.LOAD_ERRORonLoadError);
   
_loader null;
  
}
 }

and here’s my compiler options:

-static-link-runtime-shared-libraries=true
-target-player={playerVersion}
-library-path+="{flexSDK}/frameworks/locale/en_US"
-default-size=550,400
-swf-version=13 

I’m using FDT 5 to code and Flash 11.4. The version of Away3D 4 is 4.0.9 (I’m using the swc file from the Downloads page) and Flex is 4.6 (Yes, I tried to convert to a Air file and changed several times the renderMode, but so far, no success)

The trace output always says

Hello Away 3D
Complete Loaded

But no object is rendered. What am I possibly doing wrong? Thanks in advance

   

Avatar
loth, Sr. Member
Posted: 03 October 2012 08:54 AM   Total Posts: 236   [ # 1 ]

if you don’t add material you see nothing for sure
add some light to smile

   

Haunter66, Newbie
Posted: 29 January 2013 12:38 AM   Total Posts: 4   [ # 2 ]

*UPDATE*

I wasn’t aware that cleaning the project (Project/Clean…) resets the aplication.xml changing back renderMode and depthAndStencil to empty values, sorry =P

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X