Author Topic: Change Texture in Runtime  (Read 1666 times)

Offline angieIe

  • byte
  • *
  • Posts: 29
    • View Profile
Change Texture in Runtime
« on: September 06, 2016, 04:00:27 am »
Hai, i have to change texture when user click a button. How to change texture in runtime? i try add texture to texture manager and setTexture in onDrawFrame, but it not working, have error out of memory. Thank you.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Change Texture in Runtime
« Reply #1 on: September 06, 2016, 09:26:20 am »
Then your texture is simply too large. The way you are doing it is actually fine, just make sure that the texture has a reasonable size. How large was it?