how to render text with glPathGlyphsNV?

Started by Zol, July 20, 2012, 12:46:49

Previous topic - Next topic

Zol

Hi
I ´m having problems rendering text with glPathGlyphsNV(), if somebody could share some sample code how to do it,
I would be very grateful.


oskar

I think you would be better off asking this on the OpenGL forums seeing as this is not an LWJGL-specific issue. http://www.opengl.org/discussion_boards/forum.php

Zol

I got this thing working in c++ but having problems got it work in lwjgl im getting error after calling glPathGlyphsNV(...) org.lwjgl.opengl.OpenGLException: Invalid enum (1280)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:59)
   at org.lwjgl.opengl.NVPathRendering.glPathGlyphsNV(NVPathRendering.java:313)

So I´m wondering anyone used succesfully used NVPathRendering in lwjgl?

matheus23

I'm sorry, I've never used glPathGlyphsNV.

But If you get errors like "GL_INVALID_ENUM" or "GL_INVALID_VALUE" or "GL_INVALID_OPERATION", the chance is VERY high, that the xml docs for these functions give you hint, on what you might have done wrong:
http://developer.download.nvidia.com/assets/gamedev/files/GL_NV_path_rendering.txt

search for "GL_INVALID_OPERATION", and it will give you this information:

  • Queries (glGetPathParameteriv, etc.) allowing only a single path
            object to be specified, generate a GL_INVALID_OPERATION error
            if the path name does not exist.
  • glWeightPaths, glInterpolatePathsNV, and glCopyPathNV generate
            a GL_INVALID_OPERATION error if any of the named source paths
            do not exist.
  • Path commands that modify the commands, coordinates, or parameters
            of existing path objects (as opposed to specifying a path object
            completely) generate a GL_INVALID_OPERATION error if the path
            name does not exist.
  • When there is also a /numCoords/ parameter,
            the GL_INVALID_OPERATION error is generated if the number of
            coordinates is not equal to the number of coordinates needed by
            the command's specified path command sequence.  This provides
            a sanity check.
My github account and currently active project: https://github.com/matheus23/UniverseEngine