Problem with stage3D and away3D

Software: Other

JohnAdam, Newbie
Posted: 26 April 2017 07:19 AM   Total Posts: 2

Ok that is so strange it make like 3 hour i try to figure this out. First… everything was working correctly so i don’t know what i change or if i updated to new code for starling or away3d and i dont think so.

I use the standard code to create a stage3DProxy

/**
   * will start the engine
   */
  
public function StartUpEngine():void {
 
   
// Define a new Stage3DManager for the Stage3D objects
   
stage3DManager Stage3DManager.getInstance(stage);
 
   
// Create a new Stage3D proxy to contain the separate views
   
stage3DProxy stage3DManager.getFreeStage3DProxy();
   
stage3DProxy.addEventListener(Stage3DEvent.CONTEXT3D_CREATEDonContextCreated);
   
stage3DProxy.antiAlias 8;
   
stage3DProxy.color 0xff0000;
 
  
}
 
  
private function onContextCreated(event Stage3DEvent) : void {
 
   stage3DProxy
.removeEventListener(Stage3DEvent.CONTEXT3D_CREATEDonContextCreated);
 
   
stage3DProxy.width stage.fullScreenWidth;
   
stage3DProxy.height stage.fullScreenHeight;
 
   
//Init everything
   
InitAway3D();
   
InitStarling();
   
InitListeners();
 
  

all was working.. now… away3D is working but i can’t get starling to render… it’s clearly there when i trace it.

I do have a enter_frame event that do a nextFrame()

private function InitListeners():void {
    stage3DProxy
.addEventListener(Event.ENTER_FRAMEonEnterFrame);
  
}
 
  
private function onEnterFrame(e:Event):void {
 
   
//render starling and away3d
   
away3DInstance.render();
   
starlingInstance.nextFrame();
 
  

all pretty standard and it worked!

if i just disable the proxy and do a normal starling instance it’s working.

i swear all was working yesterday i just don’t get it. i trie dto just disable the away3D and starling still not render. it’s like the proxy wasn’t working but IT WAS working before…

Anyone got a hints ? it make 3 hours i’m searching and i’ve tested every options.

read more: toyota fortuner 2017, hyundai tera 190, mitsubishi attrage 2017

   

Hector, Sr. Member
Posted: 26 April 2017 08:53 AM   Total Posts: 134   [ # 1 ]

Do you have:

starlingInstance.sharedContext true;
starlingInstance.start(); 

In your initStarling() function?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X