Creating Texture and Image on a diff thread

Anything libgdx related goes here!

Re: Creating Texture and Image on a diff thread

Postby tenfour04 » Wed Sep 11, 2019 1:55 am

You can create Pixmaps on a separate thread, but you can only instantiate Textures on the game thread.

You may want to generate all your cards onto a single Pixmap using PixmapPacker. Then it will be very fast to load as a single Texture on the game thread, and using it as a TextureAtlas will be better for rendering performance anyway.
tenfour04
 
Posts: 1233
Joined: Sat Jun 18, 2011 3:24 pm

Re: Creating Texture and Image on a diff thread

Postby nnaass » Fri Sep 13, 2019 6:52 pm

You just use timer and render 1 card at a time. Yhis way you don't block the screen.
nnaass
 
Posts: 61
Joined: Sat Jan 25, 2014 4:44 pm


Return to Libgdx

Who is online

Users browsing this forum: No registered users and 1 guest

cron