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
282 stars 89 forks source link

TypeError: Error #1034 #137

Open wenguoqing opened 9 years ago

wenguoqing commented 9 years ago

TypeError: Error #1034: 强制转换类型失败:无法将 转换为 starling.display.shaders.IShader。 at starling.display.materials::StandardMaterial()[G:\work\github\Starling-Extension-Graphics\extension\src\starling\display\materials\StandardMaterial.as:0] at starling.display.graphics::Graphic()[G:\work\github\Starling-Extension-Graphics\extension\src\starling\display\graphics\Graphic.as:84] at starling.display.graphics::NGon()[G:\work\github\Starling-Extension-Graphics\extension\src\starling\display\graphics\NGon.as:0] at starling.display::Graphics/drawEllipse()[G:\work\github\Starling-Extension-Graphics\extension\src\starling\display\Graphics.as:425] at starling.display::Graphics/drawCircle()[G:\work\github\Starling-Extension-Graphics\extension\src\starling\display\Graphics.as:411]

IonSwitz commented 9 years ago

I'm sorry, but this tells me absolutely nothing. If you can isolate the crash you have in a small code sample, it will help a lot, but just giving me a call stack tells me nothing, beyond that you encountered a crash.

wenguoqing commented 9 years ago

public function StandardMaterial(vertexShader:AbstractShader = null, fragmentShader:AbstractShader = null) { this.vertexShader = vertexShader || new StandardVertexShader(); this.fragmentShader = fragmentShader || new VertexColorFragmentShader(); textures = new Vector.(); colorVector = new Vector.(); color = 0xFFFFFF; } this args modify AbstractShader,is OK. I don't know why.

IonSwitz commented 9 years ago

This looks like the same issue reported here:

https://github.com/StarlingGraphics/Starling-Extension-Graphics/issues/68

Please have a look over there. It might help you further