Author Topic: Image not visible  (Read 2025 times)

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Image not visible
« on: May 17, 2014, 08:55:17 pm »
Hey Egon,
do you have any idea why I don't see the title image?

This in ondrawFrame()

      if (man.state==SM.STATE_TITLE) {
         if (!tm.containsTexture("title1")) {
            Log.d("draw", "load title");
            tm.addTexture("title1", new Texture(am.open("title1.png"), true));
            tm.preWarm(fb);
         }
         fb.blit(tm.getTexture("title1"), 0, 0, 100, 100, 512, 512, 200, 200, 100, false);
      }



Log:
05-17 20:52:56.903: D/draw(9336): load title
05-17 20:52:59.456: D/draw(9336): draw title
05-17 20:52:59.476: D/draw(9336): draw title
05-17 20:52:59.496: D/draw(9336): draw title
...


« Last Edit: May 17, 2014, 09:03:32 pm by Irony »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Image not visible
« Reply #1 on: May 18, 2014, 02:28:02 pm »
Blitting along won't help, because the blitting will be delayed until the next "real" render, which never happens in this case. Just create an empty dummy world and insert the usual renderScene/draw/display sequence after the blitting.

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Image not visible
« Reply #2 on: May 18, 2014, 06:17:15 pm »
Damnit. Should have figured this out before, would have saved me a lot of head scratching... ... Thanks!