The Dot Docs

NVparse

NV_parse.pas is a Delphi version of NVIDIA's nvparse utility, which is a parser for vertex programs and register combiner and texture shader setups. It is very convenient when developing for NV20-class hardware.

The following functions are exported by NV_parse.pas:

  procedure nvparse(const input_string: PChar);
  function nvparse_get_errors: PPChar;
  function nvparse_error_strings: String;

The main function is nvparse(), which takes a vertex program, register combiner or texture shader script as input and translates it to the corresponding OpenGL calls. These calls are executed immediately, so the recommended use is to compile them into a display list.

The nvparse_get_errors() function returns a pointer to an array of strings (PChar) which contain error messages generated by the nvparse(). A more convenient way to get these error strings is using the nvparse_error_strings() function, which gets the error strings and returns them as a single concatenated Delphi string.

Note that NV_parse.pas links to nvparse.dll, which is NVIDIA's original code recompiled as a DLL (the original release was a static library).

The Delphi OpenGL Toolkit was written by Tom Nuydens.
See main page for disclaimer. For updates, visit Delphi3D.