I init OpenGL in my lwgjl application in this way:
glEnable(GL_TEXTURE_2D)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0, displayWidth, 0, displayHeight, -1, 1)
glMatrixMode(GL_MODELVIEW)
glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a)
When I’m drawing text using slick library and UnicodeFont or AngelCodeFont (by font.drawString(...)). Text is drawing (flipped vecrtical), but other image, which is behind text is blinking.
How to avoid blinking and draw text correct? May be something is wrong with OpenGL initialization? I tried also glDisable(GL_LIGHTING) and glEnable(GL_BLEND) with glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA). Nothing changed. 🙁
Solved! Next code works for me:
Init OpenGL:
Draw text: