Away3D 4 problem with Android

Software: Away3D 4.x

textoo, Newbie
Posted: 27 February 2012 12:35 PM   Total Posts: 8

hi,

we all know that we have to put application backgroundAlpha to zero to allow Stage3D to display inside Flex applications, i have made tests and it works this way too with Flex on Android (yeah! Air 3.2 is here!), but it seems that the same kind of problem apply with pure AS3 applications on Android and i didn’t succeeded in finding the way to hide the application background in this case.

   

textoo, Newbie
Posted: 27 February 2012 01:53 PM   Total Posts: 8   [ # 1 ]

Ok, just figured out how to make it work:

fullScreen must be false in app.xml

 

   

Morpheusz, Newbie
Posted: 27 February 2012 03:17 PM   Total Posts: 13   [ # 2 ]

I got an error that says:

Error: Error #3709: The depthAndStencil flag in the application descriptor must match the enableDepthAndStencil Boolean passed to configureBackBuffer on the Context3D object.

How did you solved that? I put the <depthAndStencil> tag to the xml and set to true. Did you managed to do anything else?

Thank you for answer.

 

   

textoo, Newbie
Posted: 27 February 2012 03:23 PM   Total Posts: 8   [ # 3 ]

I did not set this parameter in the app.xml, just set false to fullscreen.

 

   

Morpheusz, Newbie
Posted: 27 February 2012 03:34 PM   Total Posts: 13   [ # 4 ]

Can you show me some basic code what you used? I just tried out the away3d examples

 

   

textoo, Newbie
Posted: 27 February 2012 04:07 PM   Total Posts: 8   [ # 5 ]
package
{
 import away3d
.containers.View3D;
 
import away3d.lights.PointLight;
 
import away3d.materials.ColorMaterial;
 
import away3d.primitives.Cube;
 
 
import flash.display.Sprite;
 
import flash.display.StageAlign;
 
import flash.display.StageScaleMode;
 
import flash.events.Event;
 
 public class 
JoeDI3D extends Sprite
 {
  
var viewport:View3D;
  var 
material:ColorMaterial = new ColorMaterial(0xFFFFFF);
  var 
cube:Cube = new Cube(material);
  var 
light:PointLight = new PointLight();
  
  public function 
JoeDI3D()
  
{
   super
();
   
   
// prend en charge autoOrients
   
stage.align StageAlign.TOP_LEFT;
   
stage.scaleMode StageScaleMode.NO_SCALE;
   
   
viewport = new View3D();
   
viewport.backgroundColor 0x000000;
   
   
viewport.scene.addChild(cube);
   
   
material.lights [light];
   
light.= -500;
   
viewport.scene.addChild(light);
   
   
addChild(viewport);
   
   
addEventListener(Event.ENTER_FRAME,enterFrame);
  
}
  
  
private function enterFrame(evt:Event):void
  {
   cube
.rotationX++;
   
cube.rotationY++;
   
   
viewport.render();
  
}
 }

 

   

Avatar
mrpinc, Sr. Member
Posted: 27 February 2012 04:34 PM   Total Posts: 119   [ # 6 ]

To get it to work.

In stage 3D proxy set the initial value of _depthAndStencil to = true;

Also set

_backBufferWidth & _backBufferHeight to initial values (320, 480 - 1024 x 768 or whatever) then you will be able to run everything.

Just got the ant demo running on my ipad2 - runs well.

 

   

Morpheusz, Newbie
Posted: 28 February 2012 08:40 AM   Total Posts: 13   [ # 7 ]
private var _stage3DManager Stage3DManager;
  private var 
_backBufferWidth int=320;
  private var 
_backBufferHeight int=480;
  private var 
_antiAlias int=0;
private var 
_enableDepthAndStencil Boolean=true

That Way?

I got the same error:

The depthAndStencil flag in the application descriptor must match the enableDepthAndStencil Boolean passed to configureBackBuffer on the Context3D object.
at flash.display3D::Context3D/configureBackBuffer()
at away3d.core.managers::Stage3DProxy/onContext3DUpdate()[/Users/robbateman/Documents/Adobe Flash Builder 4.6/away3d-core-fp11/src/away3d/core/managers/Stage3DProxy.as:226]


Thank you for helping!

 

 

   

Morpheusz, Newbie
Posted: 28 February 2012 09:50 AM   Total Posts: 13   [ # 8 ]

Now its working on my tablet. Unfortunatelly with 6 fps:)

 

   

inSertCodE, Sr. Member
Posted: 28 February 2012 10:26 AM   Total Posts: 105   [ # 9 ]
Morpheusz - 28 February 2012 09:50 AM

Now its working on my tablet. Unfortunatelly with 6 fps:)

Can you post the link of the guide you were using to setup the development environment and what you did after that please.

 

   

Morpheusz, Newbie
Posted: 28 February 2012 10:37 AM   Total Posts: 13   [ # 10 ]

I am using Flash Builder 4.6 with the most recent Away3d avalible.
I used the Basic_Load3DS example from away3d. I didnt changed the code at all just the app.xml :

I used this link to setup the enviroment:

http://download.macromedia.com/pub/labs/flashplatformruntimes/shared/air3-2_flashplayer11-2_p6_releasenotes.pdf

i set -swf-version=15


In the initial window tag:

<fullScreen>true</fullScreen>
<visible>true</visible>
<renderMode>direct</renderMode>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<depthAndStencil>true</depthAndStencil>

_enableDepthAndStencil
In the Stage3dProxy i set the _enableDepthAndStencil to true.

I attached a rar file with the main.as file main-app.xml and the Stage3DProxy.as.

I tested that on a samsung galaxy tab 1010

Thank you for helping!

 

 

File Attachments
src.zip  (File Size: 9KB - Downloads: 275)
   

inSertCodE, Sr. Member
Posted: 28 February 2012 10:40 AM   Total Posts: 105   [ # 11 ]

Thank mate, I’ll try it out when I get home.

PS. RAR files don’t work on this forum. Try ZIP wink

 

   

Morpheusz, Newbie
Posted: 28 February 2012 01:42 PM   Total Posts: 13   [ # 12 ]

Thanks!!!:)

 

   

3dNewb, Sr. Member
Posted: 05 March 2012 08:28 AM   Total Posts: 105   [ # 13 ]

I had no problem setting up a very basic mobile project (just a view, not lights, no models nothing). I got the viewport and the stats view.

Then I tried to integrate one of my projects (many models, many materials) and this bufferAndStancil problem appeared.

Thank you for your suggestion of hardcoding the values into the Proxy, I have no idea of why it does not work otherwise.

 

   

KKelly, Newbie
Posted: 29 January 2014 01:06 PM   Total Posts: 1   [ # 14 ]

For anyone else looking for the solution to the problem ” Error #3709: The depthAndStencil flag in the application…”, adding the settings as mentioned above worked for me:

In your application xml (name_of_your_app-app.xml) set:

<fullScreen>true</fullScreen>
<visible>true</visible>
<renderMode>direct</renderMode>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<depthAndStencil>true</depthAndStencil>

depthAndStencil: true fixed the problem.  It seems so obvious now but being new to Away3D and Flash Builder in genral, hadn’t a clue.

With FlashDevelop, the only extra step was to set wmode to direct and I was off and running.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X