Saeki Amae Posted August 10, 2020 Share Posted August 10, 2020 Hello I saw two different methods of generating textures from graphics object in pixi 5 WebGL: graphics.generateCanvasTexture() renderer.generateTexture(graphics) How those methods differ from each others? And which one should I use in which cases? Documentation doesn't explain it exactly. Thank you in advance for help! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 10, 2020 Share Posted August 10, 2020 first one uses temporary CanvasRenderer to draw graphics with canvas2d context, then makes a texture based on that canvas. canvas2d analytical antialiasing looks good. second creates RenderTexture, draws graphics there. of course its webgl if your renderer is webgl. It does not have AA. Saeki Amae 1 Quote Link to comment Share on other sites More sharing options...
Saeki Amae Posted August 10, 2020 Author Share Posted August 10, 2020 Mhm I understand! So when should I use which? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 10, 2020 Share Posted August 10, 2020 usually, if its graphics - use generateCanvasTexture. because i dont know when you need to cache graphics without AA Saeki Amae 1 Quote Link to comment Share on other sites More sharing options...
Saeki Amae Posted August 10, 2020 Author Share Posted August 10, 2020 Haha, I will use generateCanvasTexture then!! Thank you for your time! 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.