Text Rendering Sample


The Text Rendering Sample is a WPF application that uses an OpenGLControl object to render text.

SharpGL Text Rendering is handle by the wgl library of functions. There are two ways to draw text - 2D or 3D.

2D Text Rendering

wgl functions can be used to render 2D, however, they are rather complex. The SharpGL.OpenGL object exposes a function named DrawText2D that can draw 2D text at any point on the screen, with a specified font, size and color.

3D Text Rendering

wgl functions can be used to render 3D text, again this is complex. Instead, the DrawText3D function of the SharpGL.OpenGL object can generate the geometry for you. You can transform and manipulate this geometry as you would with any OpenGL vertex data.

Last edited Feb 20, 2012 at 12:24 PM by dwmkerr, version 3


abnaned Jul 22, 2012 at 5:36 AM 
Drawtext3d has problems, fontsize is not changing also it is translating the world coordinates