strange problem with blitString and blit

Started by bili, April 01, 2012, 03:12:52 AM

Previous topic - Next topic

bili

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.

EgonOlsen

What is blitString? There's no such method in jPCT-AE? Can you post the render part of your code?

bili

blitString is from glfront package that comes Bones. Here is my rendering part:
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();

EgonOlsen

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?

bili

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?

EgonOlsen

Quote from: 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?
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

bili

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

EgonOlsen

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

EgonOlsen

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

bili

Thanks! it works now. I put blits after the rendering the scene and everything shows up again!   :)

Cheers!