www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: bili on April 01, 2012, 03:12:52 am

Title: strange problem with blitString and blit
Post by: bili on April 01, 2012, 03:12:52 am
If I do blitString before blit texture then only the texture shows ...but if its other way around, only strings shows  :o

Any advice plz?

Edit1: I should mention that I use a skybox also.
Edit2: ha! If i comment out skybox in rendering loop, everything shows up ...but I still need the skybox.
Title: Re: strange problem with blitString and blit
Post by: EgonOlsen on April 01, 2012, 09:29:59 pm
What is blitString? There's no such method in jPCT-AE? Can you post the render part of your code?
Title: Re: strange problem with blitString and blit
Post by: bili on April 01, 2012, 09:55:23 pm
blitString is from glfront package that comes Bones. Here is my rendering part:
Code: [Select]
frameBuffer.clear(back);
skybox.render(world, frameBuffer); // render the skybox
flower.warning(frameBuffer, displayLevel);
displayLevel.blitString(frameBuffer, "-", frameBuffer.getWidth()-30, 50, 10, null);
displayLevel.blitString(frameBuffer, "+", frameBuffer.getWidth()-30, 150, 10, null);
frameBuffer.blit(trophy, 0, 0, 15, 30, 32, 32, true);
world.renderScene(frameBuffer);
world.draw(frameBuffer);
frameBuffer.display();
Title: Re: strange problem with blitString and blit
Post by: EgonOlsen on April 01, 2012, 10:16:33 pm
I fail to see the relation between a blit and the skybox...??? What happens if you do two simple blits instead of these string blits? Which version are you using? Have you tried the latest beta? Which OpenGL version are you using? 1.1 or 2.0?
Title: Re: strange problem with blitString and blit
Post by: bili on April 01, 2012, 10:58:13 pm
If I blit just the skybox and the texture then it's fine. Everything shown. Im' using OpenGL version 1.1.  Haven't tried latest beta. I use jpct version 1.24 or something like that.  Do you have links for beta?
Title: Re: strange problem with blitString and blit
Post by: EgonOlsen on April 01, 2012, 11:06:19 pm
If I blit just the skybox and the texture then it's fine. Everything shown. Im' using OpenGL version 1.1.  Haven't tried latest beta. I use jpct version 1.24 or something like that.  Do you have links for beta?
You don't "blit" a skybox...so this isn't the actual answer to my question. What i meant was to replace the blitString()-calls by some other, "normal" blits. Here's the latest beta: http://jpct.de/download/beta/jpct_ae.jar (http://jpct.de/download/beta/jpct_ae.jar)
Title: Re: strange problem with blitString and blit
Post by: bili on April 01, 2012, 11:18:33 pm
Ah! With two normal blits, only the second one is displayed  :o And that is strange because I had blit-ted four blits before and everything worked.
Title: Re: strange problem with blitString and blit
Post by: EgonOlsen on April 02, 2012, 02:43:47 pm
Does it work if you do the blits AFTER rendering the scene? If so, then there might a bug in the batching of the blits....
Title: Re: strange problem with blitString and blit
Post by: EgonOlsen on April 02, 2012, 09:34:28 pm
I've updated the beta jar with a version that might fix the problem. Please give it a try: http://jpct.de/download/beta/jpct_ae.jar (http://jpct.de/download/beta/jpct_ae.jar)
Title: Re: strange problem with blitString and blit
Post by: bili on April 02, 2012, 10:49:31 pm
Thanks! it works now. I put blits after the rendering the scene and everything shows up again!   :)

Cheers!