Advertisement

glBlendFunc - custom fonts

Started by February 03, 2004 04:55 PM
0 comments, last by liorsaar 21 years, 1 month ago
hi there ! im trying to create bitmap based font in GL. i copied the code from NeHe lesson 17 as follows, using a white fonts on black background bitmap, and it is working fine, creating WHITE fonts. how can i create BLACK fonts ? thanks ! lior gl.glEnable( GL.GL_TEXTURE_2D ); gl.glEnable( GL.GL_BLEND ); gl.glBlendFunc( GL.GL_SRC_ALPHA, GL.GL_ONE ); gl.glBindTexture( GL.GL_TEXTURE_2D, fontTextureID ); gl.glColor3fv( WHITE ); // fonts to screen gl.glListBase( fontOffset - 32 + (128 * set) ); gl.glCallLists( string.length(), GL.GL_BYTE, string.getBytes() );
Please don''t crosspost.

Enigma

This topic is closed to new replies.

Advertisement