Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Lavos

Pages: [1]
1
Hi, I've been running into a strange issue that I haven't been able to find any answers for...

I'm trying to blit a background texture behind the game and a text string (using raft's AGLFont class) in the foreground:

In initialization:
Code: [Select]
font = new Paint();
font.setTextSize(20);
overlayFont = new AGLFont(font);
background = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.backtexture)), 512, 256));

And in the drawing method:
Code: [Select]
Display display = getWindowManager().getDefaultDisplay();
fb.blit(background, 0, 0, 0, 0, 512, 256, display.getWidth(), display.getHeight(), 100, false);
world.renderScene(fb);
world.draw(fb);
overlayFont.blitString(fb, "testing", 100, 100, 100, new RGBColor(100,90,25));
fb.display();

This works just fine on the emulator, but not on an actual device. I've tested this on two different phones (a Droid X and a Nexus S) and in both cases, neither the background nor the text show up at all. Any clue what I might be doing wrong?

Pages: [1]