openfl / away3d

An open source, real-time 3D engine for OpenFL
Apache License 2.0
206 stars 34 forks source link

Starling/Away3D interoperability is broken #55

Open TerryCavanagh opened 12 months ago

TerryCavanagh commented 12 months ago

I think Starling and Away3D interoperability is currently broken. When I try making a simple demo project with a starling layer and an Away3D layer, it just renders a black screen. Here's an example:

radiosilence_hx.zip (or on github here: https://github.com/TerryCavanagh/radio-silence-hx/commit/d3986525e8f5e088b5cf193ec5a46bc721c38d58)

This example is basically just following this old Away3D tutorial written with AS3 - http://away3d.com/tutorials/Away3D_and_Starling_Interoperation

In addition, this unrelated issue https://github.com/openfl/away3d/issues/39 contains an example Away3D + Starling project, and it just renders a black screen for me too.

(Tested on Haxe 4.3.1, OpenFL 9.2.2, Lime 8.0.2, and Away3D and Starling up to date from github. Apologies if I'm just doing something dumb, as usual)

TerryCavanagh commented 11 months ago

Just to follow up on this, we were able to get it working on our project essentially by fiddling around with events/ordering of things. Here is a commit that fixes it on our project: https://github.com/TerryCavanagh/radio-silence-hx/commit/72f9f2fde2d1d23fcd6a8fa4ea22754e54f5c226#diff-63879aafd34c9dbb5251d9c8266fc04c72c1259d876eae0cba9d84dfa8872684

So: there is a bug here, but it's one that can be worked around, so perhaps it's not that serious. Happy to close this?