Showing text

nobody wrote on Wednesday, April 16, 2008:


It is possible to show normal text in a GLFW window? Normally I use:

  Gl.glListBase\(\_fontbase - 32\);
  byte\[\] textbytes = new byte\[text.Length\];
  for\( int i = 0; i < text.Length; i++ \) textbytes\[i\] = \(byte\)text\[i\];
  Gl.glCallLists\(text.Length, Gl.GL\_UNSIGNED\_BYTE, textbytes\);

But to create the display lists I than need to have a Device Context:

  Wgl.wglUseFontBitmaps\(hDC, 32, 96, \_fontbase\)

How I can I do that using GLFW?

Thx, Marc

elmindreda wrote on Saturday, April 26, 2008:

GLFW provides a fully portable API, so platform-specific features such as this one are not exposed by it. If you wish, you can of course modify the GLFW sources to expose the DC on Win32.