Image not visible

Started by Irony, May 17, 2014, 08:55:17 PM

Previous topic - Next topic

Irony

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
...



EgonOlsen

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.

Irony

Damnit. Should have figured this out before, would have saved me a lot of head scratching... ... Thanks!