LWJGL
May 23, 2013, 10:49:45 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL is now using GitHub
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Slick-Util Library Load Fonts in 3d  (Read 796 times)
jonalu
Newbie
*
Posts: 1


« on: December 26, 2011, 05:49:44 »

Im trying to import a ttf font into a 3D lwjgl game. When i render it, it does not show any text. if i use the example program in 2d, it works. I may be a noob, but I try to learn.
Logged
CodeBunny
Nerdus Imperius
*****
Posts: 561



WWW
« Reply #1 on: December 27, 2011, 19:05:09 »

Not sure, but I'm guessing you're running into a depth buffer / frustum culling error.

Slick fonts are designed explicitly to work in a 2D, orthogonal setup. Because of the finicky nature of OpenGL, the same code executed with different matrix settings will result in completely separate results.

Try pushing both the modelview and projection matrix, calling glLoadIdentity in each, and call glOrtho for the projection matrix. Then, render the font and pop both matrices. That may work.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!