Unknown Stage3D class at cpp target

When I’m using stage3d openfl library (https://github.com/wighawag/openfl-stage3d) and targeting flash everything is fine. When I select windows or android targets compiler says:
Class not found : flash.display.Stage3D
right for import line. Sure this class described in the library. Probably there issues with auto substitution of openfl instead of flash packages? Or may be there is errors in class definition causes compiler to abort job? Or may be flash target native class cannot be overriden in other targets?
I have no idea how to solve it, because I don’t see the problem in code.

I don’t think Stage3D is available anywhere other than the flash target.

Probably you are right, but try to watch openfl-stage3d library – it’s an interface wrapper for gl and I suppose that this library have worked sometimes. I just trying to use one stage3d syntax for different platforms.

Oh I see,
probably the remap flash->openfl then yeah.

Sadly I only see renaming everything.

There’s one big drawback in renaming – native flash classes became a bunch of aliases too. Moreover when one native class demands or returns another I have to rewrite these aliases classes to cast native types to the wrapper types. It looks senseless.

Try the bindings provided in the Away3D repository:

If the bindings are good, I’m open to including it in OpenFL directly, which should help make it work out of the box :slight_smile:

Oh, I see. Thanks! But it looks quite weird:

package openfl.display;
typedef Stage3D = flash.display.Stage3D;

Is there ability to disable auto substituting of openfl/flash packages or something? I’d rather use openfl packages in every import than type bindings for all inherited stage3d stuff.
And it will be very nice to override this problem without any workarounds that obfuscating sources :relaxed:

Hmm, yeah, that one isn’t quite right either. I’ll take another look

I’ve made initial steps to merge the Stage3D compatibility layer that Away3D has helped develop. I got openfl.display.Stage3D and openfl.display3D.* in, need to look at the AGAL assember stuff :success:

AGAL helper classes are not native so there are no substitute issues.
Will these fixes be included in new openfl release?

We’re working on seeing if Away3D (and other Stage3D samples) can be supported from OpenFL directly (without a separate Stage3D layer), things are going well, I think we might have the first samples working soon