Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.6 KiB

  1. #include <glos.h>
  2. #ifdef NT
  3. #include "glstring.h"
  4. #endif
  5. #ifndef NT
  6. static const char *errors[] = {
  7. "",
  8. "missing gluEndPolygon",
  9. "missing gluBeginPolygon",
  10. "bad orientation or intersecting edges",
  11. "vertex/edge intersection",
  12. "misoriented or self-intersecting loops",
  13. "coincident vertices",
  14. "illegal data",
  15. "intersecting edges"
  16. };
  17. #else
  18. static UINT auiTessErrors[] = {
  19. STR_TESS_EMPTY , // ""
  20. STR_TESS_END_POLY , // "missing gluEndPolygon"
  21. STR_TESS_BEGIN_POLY , // "missing gluBeginPolygon"
  22. STR_TESS_BAD_EDGE , // "bad orientation or intersecting edges"
  23. STR_TESS_INTERSECT , // "vertex/edge intersection"
  24. STR_TESS_BAD_LOOP , // "misoriented or self-intersecting loops"
  25. STR_TESS_VERTICES , // "coincident vertices"
  26. STR_TESS_BAD_DATA , // "illegal data"
  27. STR_TESS_INTERSECT_EDGE // "intersecting edges"
  28. };
  29. #define NERRORS ( sizeof(auiTessErrors)/sizeof(auiTessErrors[0]) )
  30. static char *errors[NERRORS];
  31. static WCHAR *errorsW[NERRORS];
  32. #endif
  33. const char *__glTessErrorString(int errno)
  34. {
  35. return (const char *) errors[errno];
  36. }
  37. #ifdef NT
  38. const WCHAR *__glTessErrorStringW(int errno)
  39. {
  40. return (const WCHAR *) errorsW[errno];
  41. }
  42. VOID vInitTessStrings(HINSTANCE hMod, BOOL bAnsi)
  43. {
  44. int i;
  45. if (bAnsi)
  46. {
  47. for (i = 0; i < NERRORS; i++)
  48. errors[i] = pszGetResourceStringA(hMod, auiTessErrors[i]);
  49. }
  50. else
  51. {
  52. for (i = 0; i < NERRORS; i++)
  53. errorsW[i] = pwszGetResourceStringW(hMod, auiTessErrors[i]);
  54. }
  55. }
  56. #endif /* NT */