|
mrpinc, Sr. Member
Posted: 07 November 2011 03:58 PM Total Posts: 119
When I start my application I launch it in full screen mode. After I load my scene and then hit escape to exit full-screen mode I get the following Away 3D error
Error: Error #3600: No valid program set. at flash.display3D::Context3D/drawTriangles() at away3d.materials.passes::MaterialPassBase/render() at away3d.materials.passes::DepthMapPass/render() at away3d.materials::MaterialBase/renderDepth() at away3d.core.render::DepthRenderer/drawRenderables() at away3d.core.render::DepthRenderer/draw() at away3d.core.render::RendererBase/executeRender() at away3d.core.render::RendererBase/render() at away3d.lights.shadowmaps::DirectionalShadowMapper/drawDepthMap() at away3d.lights.shadowmaps::ShadowMapperBase/renderDepthMap() at away3d.containers::View3D/updateLights() at away3d.containers::View3D/render()
Hopefully there’s an easy fix.
|
mrpinc, Sr. Member
Posted: 07 November 2011 07:01 PM Total Posts: 119
[ # 1 ]
I found a hack solution to this problem.
When I exit full-screen mode I destroy my existing view and create a new one, I supply the existing camera and scene so everything gets rendered as it should.
|
mrpinc, Sr. Member
Posted: 07 November 2011 07:08 PM Total Posts: 119
[ # 2 ]
Turns out the above mentioned solution is not really a solution since it only works in DEBUG mode - very weird indeed.
|
theMightyAtom, Sr. Member
Posted: 07 November 2011 07:43 PM Total Posts: 669
[ # 3 ]
I’ve run all my Away3d 4.0 apps in Fullscreen and never run into this error.
Maybe you could share a link or your source?
|
mrpinc, Sr. Member
Posted: 08 November 2011 01:45 PM Total Posts: 119
[ # 4 ]
I’ve been able to recreate the problem using the Ant Demo - Here it is with the code I created. The app starts fine but once you hit escape to exit fullscreen mode it throws the runtime error described in my initial post. I’m copying just the part of the class I changed, the whole thing exceeds the limits the forum supports.
/** * Constructor */ public function Basic_Load3DS() { addEventListener(Event.ADDED_TO_STAGE, onAdded); } private function onAdded(e:Event):void { stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; removeEventListener(Event.ADDED_TO_STAGE, onAdded); stage.addEventListener(Event.RESIZE, onStageResize); stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; } private function startApp():void { init(); } private function onStageResize(e:Event):void { stage.removeEventListener(Event.RESIZE, onStageResize); startApp(); }
|
theMightyAtom, Sr. Member
Posted: 08 November 2011 01:58 PM Total Posts: 669
[ # 5 ]
Hmm, interesting. As expected I was unable to go into Fullscreen mode without some kind of Mouse interaction. Are you saying, as your code suggest, that you get this to go into Fullscreen automatically at startup? AFAIK that’s against Flash Player security policy.
|
mrpinc, Sr. Member
Posted: 08 November 2011 02:02 PM Total Posts: 119
[ # 6 ]
I do go to fullscreen mode automatically. The application runs standalone and not in the browser. You are correct that it would not work in the browser but building with the stand alone player in Flash Develope, and launching from a Flash Projector it works fine.
|
theMightyAtom, Sr. Member
Posted: 08 November 2011 08:42 PM Total Posts: 669
[ # 7 ]
mrpinc, you’ve reduced the code in your example, no doubt in order to make it more clear, but now I can’t try it. Are you handling the resize? Or are you relying on Away3D to somehow follow your rescaling automatically? I admit I don’t have much experience of running Flash this way. Surely you want to be in a browser, or build an AIR application?
|
mrpinc, Sr. Member
Posted: 08 November 2011 09:08 PM Total Posts: 119
[ # 8 ]
The business demands require that I am not in the browser, AIR might prove to be suitable but not at this moment.
The code is simply me replacing the top of the Ant demo that Away3D supplies.
Handling re-size does not actually matter. If I do nothing during resize and let Away 3D continue to render to the initial viewport I get the error I mentioned above. If I resize the Viewport then I also get the error above.
The only time I don’t not get the stated error is if I destroy the Away3D view and re-instantiate it. This only works in debug mode in the debug player though.
|
mrpinc, Sr. Member
Posted: 23 November 2011 08:50 PM Total Posts: 119
[ # 9 ]
I have updated my project to us AIR and the problem still persists. I start my app in FULL_SCREEN and when I leave full Screen I get the following error:
Error: Error #3600: No valid program set. at flash.display3D::Context3D/drawTriangles() at away3d.materials.passes::MaterialPassBase/render() at away3d.materials.passes::DefaultScreenPass/render() at away3d.materials::MaterialBase/renderPass() at away3d.core.render::DefaultRenderer/drawRenderables() at away3d.core.render::DefaultRenderer/draw() at away3d.core.render::RendererBase/executeRender() at away3d.core.render::RendererBase/render() at away3d.containers::View3D/render()
|
HowlingBard, Newbie
Posted: 29 November 2011 11:27 AM Total Posts: 20
[ # 10 ]
Hi, everybody! I’m getting the same bug in another situation.
When I use dispose method with parameter “deep” equal to “true”.
I hope that it can help developers to fix it.
|
mrpinc, Sr. Member
Posted: 05 January 2012 04:59 PM Total Posts: 119
[ # 11 ]
Update on this problem.
It looks like this issue occurs if you set - stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; - before context3D is available.
If you wait for stage3DProxy to fire Stage3DEvent.CONTEXT3D_CREATED event
then set your StageDisplayState to fullscreen, you won’t get errors exiting/entering fullscreen mode
This is an ok solution except in the situation where you want your app to launch fullscreen - in this case , the context3D will not be available yet and you will get an app crippling error exiting Full screen mode. If you wait until the above mentioned event fires then your application will appear in a windows for a brief period of time (unfortunately for my application, we must start in fullscreen mode)
Not sure if this issue can be handled differently by Away 3D or if this is more related to Flash Player.
|