AlphaComposite transparency

Hey, I’m doing a 2D game using GTGE engine, and I’m using LWJGL as renderer.

I’m using this in my code to make a white rectangle only 25% visible. However, it always displays as solid white. If I disable LWJGL, just use Java2D, then it appears right. Any ideas?

         Composite originalComposite = g.getComposite();
         g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.25f));
         g.setColor(Color.WHITE);
         g.fillRect(x, y, w, h);
         g.setComposite(originalComposite);

wtf…

someone ban that spamming tard

I cant see any LWJGL code there, it seems its J2D. Maybe you need to ask the creators of GTGE on their boards as most of us dont know the internal workings of that engine…

Sorry I couldnt help much.

DP