chunk-QXZVBSBH.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import {
  2. s,
  3. s3 as s2
  4. } from "./chunk-EMJ4ZSM2.js";
  5. import {
  6. a
  7. } from "./chunk-GZT4BVFP.js";
  8. // node_modules/@arcgis/core/views/webgl/checkWebGLError.js
  9. var n = s.getLogger("esri/views/webgl");
  10. function o(e, r) {
  11. switch (r) {
  12. case e.INVALID_ENUM:
  13. return "Invalid Enum. An unacceptable value has been specified for an enumerated argument.";
  14. case e.INVALID_VALUE:
  15. return "Invalid Value. A numeric argument is out of range.";
  16. case e.INVALID_OPERATION:
  17. return "Invalid Operation. The specified command is not allowed for the current state.";
  18. case e.INVALID_FRAMEBUFFER_OPERATION:
  19. return "Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";
  20. case e.OUT_OF_MEMORY:
  21. return "Out of memory. Not enough memory is left to execute the command.";
  22. case e.CONTEXT_LOST_WEBGL:
  23. return "WebGL context has been lost";
  24. default:
  25. return "Unknown error";
  26. }
  27. }
  28. var a2 = !!a("enable-feature:webgl-debug");
  29. function u() {
  30. return a2;
  31. }
  32. function c() {
  33. return a2;
  34. }
  35. function s3(r) {
  36. if (u()) {
  37. const t = r.getError();
  38. if (t) {
  39. const a3 = o(r, t), u2 = new Error().stack;
  40. n.error(new s2("webgl-error", "WebGL error occured", { message: a3, stack: u2 }));
  41. }
  42. }
  43. }
  44. export {
  45. u,
  46. c,
  47. s3 as s
  48. };
  49. //# sourceMappingURL=chunk-QXZVBSBH.js.map