Jump to content


  • Content Count

  • Joined

About canvasman

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Moonrat is the best! Thanks dude
  2. Okay! Regarding the #1 question, would you call both removeChild() and .destroy() in that order or only either in my case when you don't need to use that same sprite later?
  3. I am creating multiple sprites from same texture in PIXI v5, I have few questions: 1. When I am not going to use specific sprite anymore, do I need to remove the sprite from container with container.removeChild(sprite) before calling sprite.destroy()? I call destroy without arguments because I don't want to destroy the texture which I might use later to create more sprites. 2. What is the difference between calling container.removeChild(sprite) and sprite.destroy(without arguments)? Does the GC collect everything regarding the sprite in either way? (except the
  4. Should I turn transparancy on and set body element background with css or set transparency false and pass backgroundColor property to renderer options? Which of those two is better considering performance or is there any difference?
  5. On my laptop Chrome somehow used the bad GPU instead, then I changed it on nvidia settings and chrome started using the better one. I hope thats not common situation. Just checked that PIXI v4.x uses that failIfMajorPerformance thing when checking for webgl support so autoDetectRenderer return canvas renderer if that thing fails as well. https://github.com/pixijs/pixi.js/blob/v4.x/src/core/utils/index.js#L310 Do you just check if that GPU string in gl context is in blacklist or how it works? Also did you made the list yourself or where did you get it?
  6. Which do you use: autoDetectRenderer with or without forceCanvas as default and option to opt WebGL rendering? How common is it that clients CPU would render faster than GPU? I encountered also some situations where browser had the chosen the worse GPU of the two, no idea how to handle this. https://stackoverflow.com/a/32439423/10324719 Does PIXI use failIfMajorPerformanceCaveat, could it help?
  7. What are some situations when people don't want to use it? Is it safe to use devicePixelRatio in renderer resolution or do I need to do (devicePixelRatio || 1)?
  8. Should I set renderer transparent and change css background color for canvas or body element or pass backgroundColor to renderer options? Is there some performance difference?
  9. I need to make background for the game so my options are: 1. Create large image which fits to the map 2. Use tiling sprites What are the pros and cons between those two, regarding both canvas and webgl renderer? With tiling sprite less network usage when downloading? Less GPU memory needed? Is it slower to render tiling sprites spanning size of large image instead of rendering just that large image?
  10. If I have a lot of objects in my stage and I want to destroy whole stage with its children what would be good way to exclude some of textures or base textures from being destroyed? Should I remove them with removeChild before I will do stage.destroy(true) or could I NOOP destructive functions somehow in chosen textures? Looks like PIXI.Texture.WHITE has something like this going here https://github.com/pixijs/pixi.js/blob/dev/packages/core/src/textures/Texture.js#L567 Could that removeAllHandlers() functions be used in my situation? Also why is .on, .once and .emit NOOPed, isnt .destroy e
  11. How can I create textures from canvas or html image object without adding them to Texture/BaseTexture caches? I tried PIXI.Texture.from EDIT: Does this cache anything? var baseTexture = new PIXI.BaseTexture(image); var texture = new PIXI.Texture(baseTexture);
  12. Okay, so in that object I can see everything which has some GPU memory reserved currently? Also textures which I get after loader is done, do they reserve the GPU all the time until they are destroyed?
  13. Okay! So if I wanted, I could load image to Image() object and pass that to Texture.from to create texture from it? Btw would that be syncronous task when Texture.from processes the data from Image() Thanks for your answer
  14. Wait what is the bindTexture? I can't find any documentation. Thanks for the answer anyway
  15. After resetting applications state and destroy all the textures, can I see anywhere if there is still some textures left in the GPU memory or confirm that the GPU's memory has been released and there is no memory leaks? In task manager I check dedicated GPU memory. After adding some textures and resetting application state, destroying all textures it still wont go back to where it was at the beginning. So where and what values should I look at about GPU's memory status? Also does every texture loaded with PIXI's loader reserve GPU memory even if its not present in scene anymore?
  • Create New...