StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
285 stars 88 forks source link

affect other DisplayObject render #3

Closed hooh closed 12 years ago

hooh commented 12 years ago

After the fill or stroke is added, some other display are weird.

  1. the background of starling state disappear.
  2. Some starling DisplayObject will disappear briefly(the object is still here and touchable, but could not be rendered).

I have fixed the second issue by add renderSupport.finishQuadBatch(); to the beginning of the Graphic class render function and "var context:Context3D = Starling.context; if (context == null) throw new MissingContextError(); context.setVertexBufferAt(0, null); context.setVertexBufferAt(1, null);" to the end of it.

jonathanrpace commented 12 years ago

Thanks for the heads-up. Looks like we're not leaving the context in an appropriate state for Starling to move on to rendering other display objects. I'll look into this ASAP.

jonathanrpace commented 12 years ago

Fixed. https://github.com/unwrong/Starling-Extension-Graphics/commit/edef2a5e0f61fcf70509dcee18cce27a4f8d5656