I’m having a strange problem with alpha in LWJGL. I’m drawing 2D graphics (so no depth-testing going on) which have transparency. Wherever a translucent graphic is drawn onto the screen, it seems to be overriding the alpha of those pixels–so if I draw a translucent graphic over a fully opaque background, it causes the resulting image to be transparent despite the background. This is ultimately causing my game window to have transparent holes in it that show through to whatever window is behind the game.
Here’s a partial screenshot. You can see the text from the IDE showing through spots on the screen where some translucent shadow graphics were drawn.
Here’s the relevant code. initGl() is called once during setup. update() is called in a loop to draw the screen. drawTexture() is just a helper function.
http://pastebin.java-gaming.org/4b71c810c98
side note: the Texture class referenced is not from Slick-Util, it’s a class I made myself, thus using image width and height of 1 instead of using getWidth() and getHeight() within the drawTexture function
I’m not new to Java but I am rather new to LWJGL and OpenGL in general. Any help is appreciated, I’ve been trying to figure this out for the past couple days without any luck.