Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Requesting BASELINE_EXTENDED profile in air 3.9 or 4.0 causes error

New Here ,
Jan 06, 2014 Jan 06, 2014

This line of code

stage.stage3Ds[0].requestContext3D( Context3DRenderMode.AUTO, Context3DProfile.BASELINE_EXTENDED );

causes error "Error #2008: Parameter profile must be one of the accepted values." if app is compiled for desktop with air sdk 3.9 or air sdk 4.0 beta (didn't tried another sdk's). Compiling for web works fine. So what is this error? Where can I find information?

TOPICS
ActionScript
620
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 06, 2014 Jan 06, 2014

Just made a quick test on 3.9, Application, set to direct render of course, no issue:

package

{

          import flash.display.Sprite;

          import flash.display.Stage3D;

          import flash.display.StageAlign;

          import flash.display.StageScaleMode;

          import flash.display3D.Context3D;

          import flash.display3D.Context3DProfile;

          import flash.display3D.Context3DRenderMode;

          import flash.events.ErrorEvent;

          import flash.events.Event;

          public class CX3D extends Sprite

          {

                    private var s3d:Stage3D;

                    private var rc:Context3D;

                    public function CX3D()

                    {

                              stage.align = StageAlign.TOP_LEFT;

                              stage.scaleMode = StageScaleMode.NO_BORDER;

                              s3d = this.stage.stage3Ds[0];

                              s3d.addEventListener(Event.CONTEXT3D_CREATE, onContextF);

                              s3d.addEventListener(ErrorEvent.ERROR, contextErrorF );

                              s3d.requestContext3D(Context3DRenderMode.AUTO, Context3DProfile.BASELINE_EXTENDED);

                    }

                    private function contextErrorF(e:Event):void

                    {

                              trace('Error ' + e);

                    }

                    private function onContextF(e:Event):void

                    {

                              trace('Created ' + e);

                              rc = Stage3D( e.target ).context3D;

               trace(rc);

                    }

          }

}

Trace:

Created [Event type="context3DCreate" bubbles=false cancelable=false eventPhase=2]

[object Context3D]

(used a TextField for output in my finished .exe)

edit:

Although unlikely, if your desktop GPU is old enough it very well may not support that mode.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 07, 2014 Jan 07, 2014

Yeah, sorry, my bad. I forgot to explicitly set swf-version.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 07, 2014 Jan 07, 2014
LATEST

That'll do it. Glad you got it working, good luck!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines