Jump to content

Generating textures - different methods


Saeki Amae
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...