aurbano Posted October 20, 2014 Share Posted October 20, 2014 I've posted this as an issue on Github, but I wanted to check here if someone has seen this as well. I tried searching but nothing similar came up. I had a simple library that drew text on the canvas, that i decided to port to Pixi in order to use WebGL. Now when calling drawCircle() more than approximately 850 times, it starts doing strange things. Whereas the same number with drawRect() works fine. Sample working fine (drawRect), and sample with strange behavior (drawCircle). The source code is all available on Github, for exact references check the issue. Any ideas? Quote Link to comment Share on other sites More sharing options...
CinkoNaap Posted October 21, 2014 Share Posted October 21, 2014 I think this behaviour is caused by wrong polygons calculation. Are you sure you are using PIXI Graphics API correctly? If that's the case, you need to contant PIXI gurus to investigate. Quote Link to comment Share on other sites More sharing options...
chg Posted October 21, 2014 Share Posted October 21, 2014 I'm tempted to suggest not drawing so many circles... but I've a suspicion the issue is caused by WebGLGraphics.js buildCircle method calculating the indices to use like so: var vecPos = verts.length/6; Quote Link to comment Share on other sites More sharing options...
aurbano Posted October 22, 2014 Author Share Posted October 22, 2014 Hey guys, I think I'm using the Graphics API correctly, but I'm new to Pixi.js so there might something I forgot. Obviously drawing less polygons solves the issue. The problem seems to be with their circle drawing WebGL program , since rectangles don't exhibit this issue. WebGL should be perfectly capable of handling way more circles than that though, I have done experiments without Pixijs where ~60k circle nodes where rendered on the screen so there must be a bug somewhere there. For reference, the experiment I'm referring to was rendered using VivaGraphjs. I'll try to debug the issue, although I hope the Pixijs devs will be able to figure it out Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.