@luma.gl/webgl 9.0.6 → 9.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1604,10 +1604,10 @@ function setDeviceParameters(device, parameters) {
1604
1604
  if (parameters.depthBias !== void 0) {
1605
1605
  gl.polygonOffset(parameters.depthBias, parameters.depthBiasSlopeScale || 0);
1606
1606
  }
1607
- if (device.features.has("provoking-vertex-webgl")) {
1608
- const extensions = webglDevice.getExtension("WEBGL_provoking_vertex");
1609
- const ext = extensions.WEBGL_provoking_vertex;
1610
- if (parameters.provokingVertex) {
1607
+ if (parameters.provokingVertex) {
1608
+ if (device.features.has("provoking-vertex-webgl")) {
1609
+ const extensions = webglDevice.getExtension("WEBGL_provoking_vertex");
1610
+ const ext = extensions.WEBGL_provoking_vertex;
1611
1611
  const vertex = map("provokingVertex", parameters.provokingVertex, {
1612
1612
  first: 36429,
1613
1613
  last: 36430
@@ -1615,19 +1615,21 @@ function setDeviceParameters(device, parameters) {
1615
1615
  ext == null ? void 0 : ext.provokingVertexWEBGL(vertex);
1616
1616
  }
1617
1617
  }
1618
- if (device.features.has("polygon-mode-webgl")) {
1619
- const extensions = webglDevice.getExtension("WEBGL_polygon_mode");
1620
- const ext = extensions.WEBGL_polygon_mode;
1621
- if (parameters.polygonMode) {
1622
- const mode = map("polygonMode", parameters.polygonMode, {
1623
- fill: 6914,
1624
- line: 6913
1625
- });
1626
- ext == null ? void 0 : ext.polygonModeWEBGL(1028, mode);
1627
- ext == null ? void 0 : ext.polygonModeWEBGL(1029, mode);
1628
- }
1629
- if (parameters.polygonOffsetLine) {
1630
- gl.enable(10754);
1618
+ if (parameters.polygonMode || parameters.polygonOffsetLine) {
1619
+ if (device.features.has("polygon-mode-webgl")) {
1620
+ if (parameters.polygonMode) {
1621
+ const extensions = webglDevice.getExtension("WEBGL_polygon_mode");
1622
+ const ext = extensions.WEBGL_polygon_mode;
1623
+ const mode = map("polygonMode", parameters.polygonMode, {
1624
+ fill: 6914,
1625
+ line: 6913
1626
+ });
1627
+ ext == null ? void 0 : ext.polygonModeWEBGL(1028, mode);
1628
+ ext == null ? void 0 : ext.polygonModeWEBGL(1029, mode);
1629
+ }
1630
+ if (parameters.polygonOffsetLine) {
1631
+ gl.enable(10754);
1632
+ }
1631
1633
  }
1632
1634
  }
1633
1635
  if (device.features.has("shader-clip-cull-distance-webgl")) {
@@ -3903,7 +3905,7 @@ var WEBGLRenderPipeline = class extends import_core17.RenderPipeline {
3903
3905
  const binding = this.shaderLayout.bindings.find((binding2) => binding2.name === name) || this.shaderLayout.bindings.find((binding2) => binding2.name === `${name}Uniforms`);
3904
3906
  if (!binding) {
3905
3907
  const validBindings = this.shaderLayout.bindings.map((binding2) => `"${binding2.name}"`).join(", ");
3906
- if (options == null ? void 0 : options.disableWarnings) {
3908
+ if (!(options == null ? void 0 : options.disableWarnings)) {
3907
3909
  import_core17.log.warn(`Unknown binding "${name}" in render pipeline "${this.id}", expected one of ${validBindings}`)();
3908
3910
  }
3909
3911
  continue;