www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: zhangbo8808 on July 11, 2012, 12:45:36 pm

Title: About overlay class
Post by: zhangbo8808 on July 11, 2012, 12:45:36 pm
I want to show some pictures above my screen(for example,arrow/up/down/left),so I use overlay.
I wrote like this:

Texture arrowdown=new Texture(BitmapHelper.rescale(LoaderMana.LoadBitMap(R.drawable.arrowdown),128,128));
TextureManager.getInstance().addTexture("arrowdown",  arrowdown);
Overlay down = new Overlay(world, 128, 128, 256, 0, "arrowdown");

But the arrow did't show,Is there any problems?or is there any other ways?
Title: Re: About overlay class
Post by: EgonOlsen on July 11, 2012, 12:54:27 pm
You can use FrameBuffer.blit(...) instead. However, Overlay actually works fine as far as i know. Your coordinates look a bit strange though:

128, 128, 256, 0
   
Your lower right corner y value is above the upper left...that doesn't make much sense.
Title: Re: About overlay class
Post by: zhangbo8808 on July 12, 2012, 09:28:55 am
thank you, I got it. very low gradewrong. I thought the L+B is the origion(actually the L+T). so my overlay is out of my screen