Posted December 12, 201410 yr I'm having a tough time getting alpha transparency on strings to work. GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); mc.fontRenderer.drawStringWithShadow("Hello, world!", x, y, color + (alpha << 24)); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); The alpha value is between 0 and 255, inclusively, but it refuses to render on certain numbers. Is there a different way of accomplishing this, or is my bitwise calculation off? I can't find help support for GUI text transparency anywhere. Thanks in advance.
December 12, 201410 yr try a bitwise OR operation ( | operator) e.g. color | (alpha << 24) Although for this use (with colors being bit-aligned), there should not be a functional difference. Unfortunately, I have not tried playing around with transparent font-rendering, so could not give you a 100% for sure solution =\.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.