-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stage3D proxy is null in Filter3DRenderer when setting filters3d property #6
Comments
Example project to replicate error: https://github.com/jasonsturges/openfl-away3d-filter3d Filter is added at line 132 Looks like the proxy is set after the first frame's render, but I believe I should be able to add a 3d filter before frame 2. Maybe this is by design. Not to further complicate this, but when the filter is added on frame 2, mac64 target throws
|
Just a quick note (not a complete solution - sorry). In your example, stage3DProxy is indeed null and as such causes the error. The reason for this is that the stage3DProxy is only requested when the view is added to the stage. In your Away3DViewport class, moving the addChild(view) from the end of the initialiseListeners (ln95) to the end of initializeEngine (after ln65) instatiates a stage3DProxy before adding the filters and fixing your error. Now the next problem is that the DepthOfFieldFilter3D is causing a GL error at the moment at runtime which I've not yet looked at. I tried the BloomFilter3D and that seemed to work ok after moving the addChild reference. See what you think but it might be easier to close this item (after you've checked it) and create a new issue for the DepthOfFieldFilter3D for clarification. |
That makes total sense - sorry about that. Cool, let me track down the exact issue with the DepthOfFieldFilter3D and log that here, or appropriate project if root cause is Lime or OpenFL. Thanks, again. |
When I add 3d filters to a view, I'm receiving a runtime exception.
Adding filters to my view:
In
View3D
, theset_filters3d()
property creates a newFilter3DRenderer
In the
Filter3DRenderer
constructor,stage3DProxy
is null.This errors in
Filter3DRenderer
at line 35 when adding the event listener.Null object reference at
_stage3DProxy.addEventListener()
Apologies if I'm missing something, but I believe the proxy is in error.
I'll put together a small project to isolate this error and help debug this error here.
The text was updated successfully, but these errors were encountered: