java - glCallList with slick-util -
Whenever I draw my display list my clever text does not render correctly
glCallList's When Using:
Without the use of GlCallList:
Presenting the display list:
if (dl location! = -1) {GL11.glPushMatrix (); GL11.glTranslatef (x, y, 0); GL11.glCallList (dlLocation); GL11.glPopMatrix (); }
All display lists have been created by this method:
Private static int createDisplayList (texture T, integer width, integer height) {int returnInt = GlGenLists (1); GlNewList (returnINT, GLNMPiLE); {T. Bund () glEnable (GL_TEXTURE_2D); GlColor4f (1, 1, 1, 1); GlBegin (GL_QUADS); {GlTexCoord2f (0, 0); GlVertex2f (0, 0); GlTexCoord2f (1, 0); GlVertex2f (width, 0); GlTexCoord2f (1, 1); GlVertex2f (width, height); GlTexCoord2f (0, 1); GlVertex2f (0, height); } Glend (); GlDisable (GL_TEXTURE_2D); } GlEndList (); Return Return}
I am providing text using clever-use TrueType fonts.
glNewList
outside < Code> glBindTexture (In your case t.bind ()
/ Strong> might help.
GlennBel (GL_TEXTURE_2D) ; GlBindTexture (GL_TEXTURE_2D, Texture) GlobalList (NewList) Globinated (GL_TEXTURE_2D, 0)
Comments
Post a Comment