thibou Posted December 5, 2013 Share Posted December 5, 2013 Hi all! I'm experimenting with pixi.js to draw an isometric scene based on tiles in Ejecta/iOS. I'm using a DisplayObjectContainer to store a grid (say, 50*50) of isometric tiles. I use another DisplayObjectContainer to contain a RenderTexture sprites (say, 2*2) grid. I render those original tiles to the rendertextures. This enables super fast scrolling and zooming etc. when just 4 sprites are displayed. However, there are cases when I need to display and modify a part of the original 50*50 tile grid. A subset of it is displayed at once, say 20*20. I manage to get 60FPS also with that, but when adding a lot of extra sprites on top of that, especially MovieClip objects, the FPS starts to drop below 60 with an iPad 2. XCode Instruments opengl profiler gives the following info:Batches 14Triangles rendered 2000GL & Platform calls 159 Instruments recommends the following optimizations (in pixi): -Use Vertex Array Objects (lot of them)-Reduce Small batch draw calls-Reduce redundant state calls (e.g. glBindTexture, glBlendFunc, glBindFrameBuffer)-Inefficient state updates (glEnableVertexAttribArray(0u)) Any tips on how to optimize pixi in this case? I'm posting this because it might help optimizing pixi in general. I'm happy to provide more details if needed. Any further culling/flagging invisible the sprites is not possible (to my understanding). Cheers 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.