Converting Android Bitmap to LibGdx's Texture

前端 未结 4 1249
失恋的感觉
失恋的感觉 2020-12-03 16:31

i am trying to convert bitmap into a libGDX Texture by converting:

  1. Android Bitmap to byte[]
  2. byte[] to libGDX Pi
4条回答
  •  情歌与酒
    2020-12-03 17:11

    you have to code on a new thread because pixmap class takes time for byte conversion and sometimes returns a temporary pixmap in case the process hasnt finished so its better to run on a seperate thread and your problem will be solved.

提交回复
热议问题