AwayStats Driver

Software: Away3D 4.x

Lucid, Member
Posted: 04 April 2012 10:53 AM   Total Posts: 93

Is there a way to access the AwayStats driver variable to reveal which mode the application is using (Software, OpenGL, DirectX). Ideally there could be actions taken if this variable can be read.

   

Ontheronix, Jr. Member
Posted: 04 April 2012 11:49 AM   Total Posts: 37   [ # 1 ]

nvm

   

Avatar
kurono, Sr. Member
Posted: 04 April 2012 01:34 PM   Total Posts: 103   [ # 2 ]

Use “context3D.driverInfo”. Where context3D is obviously the Context3D smile

   

Lucid, Member
Posted: 04 April 2012 01:37 PM   Total Posts: 93   [ # 3 ]

How would I access this through Away3D?

   

Avatar
kurono, Sr. Member
Posted: 04 April 2012 01:49 PM   Total Posts: 103   [ # 4 ]

view.stage3DProxy.context3D.driverInfo

view is View3D

—-

for my PC i got this: “DirectX9 (Direct blitting)”

   

Lucid, Member
Posted: 04 April 2012 01:58 PM   Total Posts: 93   [ # 5 ]

@ kurono

I’ve tried checking immediately after the view has been added to the stage, but I get an error. When can I check this value so it would return a proper value?

This yields an error if checked (to soon I suppose) 
trace(view.stage3DProxy.context3D.driverInfo)

(and yes, my View3D is also named view)

   

Lucid, Member
Posted: 04 April 2012 02:06 PM   Total Posts: 93   [ # 6 ]

FYI

I’ve added this to the enter frame function:
try{ trace(view.stage3DProxy.context3D.driverInfo) }catch(e:Error){}

It does eventually begin to trace ‘OpenGL (Direct blitting)’. Is there, however, an accurate way to trace for this - meaning, is there a way to know this value is ready - such as adding some kind of event listener to the view?

   

Avatar
kurono, Sr. Member
Posted: 04 April 2012 03:57 PM   Total Posts: 103   [ # 7 ]

I’m not well-experienced in Away3D’s API, but I can give you some advances for direct listening.

1) Away’s “Stage3DProxy” class represents current Stage3D (one of 4 possible). So, I believe you can use it as Stage3D.

2) Assume, stage3d:Stage3D = stage.stage3Ds[0];

stage3d.addEventListener(Event.CONTEXT3D_CREATEonInit);
stage3d.requestContext3D(); 

And smth like this:

private function onInit(e:Event):void {
   removeEventListener
(Event.ENTER_FRAMErender);   
   
context3D = (e.target as Stage3D).context3D;
   if (
context3D == null) return;

This’s the way to check if context3d is available now.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X