Menu

Showing text

Using GLFW
2008-04-16
2012-11-08
  • Nobody/Anonymous

    Hi,

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

      Gl.glPushAttrib\(Gl.GL\_LIST\_BIT\);
      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\);
      Gl.glPopAttrib\(\);
    

    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

      elmindreda - 2008-04-26

      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.