This is a font class (Jan 2001) that enables you to write full 3D text in opengl easily. The screenshot shows an app I’ve made using the font class. As you can see it can display both wireframe and solid fonts. The solid fonts have correct normals and can therefore be lit properly. The class is windows-only as of now due to the fact that it uses wgl* functions, but it could be ported to GNU/Linux/macOS I beleive, send me a mail if you want to help. The class is easy to use, you create a CFont object and initialise it by sending your HDC and a style parameter which can be FONT_WIREFRAME for wireframe fonts and FONT_SOLID for solid fonts. Then you call the “Print()” member function of the object and the text is displayed, a destructor takes care of the cleaning up. See the header file here: Fontclass Header, as you can see the class is very simple, but that’s a choice from my side since I don’t need more advanced fonts yet. The basic font code is highly inspired by NeHe’s tutorial and the Print() function is almost identical to the one NeHe wrote. The font class can be downloaded here: Font Class (Jan 2001)
-
Archives
- June 2010
- May 2010
- April 2010
- December 2009
- September 2009
- August 2009
- July 2009
- November 2008
- October 2008
- August 2008
- June 2008
- February 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- November 2005
- October 2005
- August 2005
- July 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- October 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- February 2003
- January 2003
- December 2002
- August 2002
- June 2002
- May 2002
- March 2002
- January 2002
- November 2001
- October 2001
- September 2001
- August 2001
- July 2001
- June 2001
- May 2001
- April 2001
- March 2001
- February 2001
- January 2001
-
Meta