@luma.gl/webgl 9.0.8 → 9.0.10

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
@@ -1602,6 +1602,7 @@ function setDeviceParameters(device, parameters) {
1602
1602
  }
1603
1603
  }
1604
1604
  if (parameters.depthBias !== void 0) {
1605
+ gl.enable(32823);
1605
1606
  gl.polygonOffset(parameters.depthBias, parameters.depthBiasSlopeScale || 0);
1606
1607
  }
1607
1608
  if (parameters.provokingVertex) {
@@ -3127,9 +3128,6 @@ var WEBGLRenderPass = class extends import_core15.RenderPass {
3127
3128
  }
3128
3129
  end() {
3129
3130
  popContextState(this.device.gl);
3130
- if (this.props.framebuffer) {
3131
- setGLParameters(this.device.gl, { framebuffer: null });
3132
- }
3133
3131
  }
3134
3132
  pushDebugGroup(groupLabel) {
3135
3133
  }
@@ -3144,7 +3142,7 @@ var WEBGLRenderPass = class extends import_core15.RenderPass {
3144
3142
  * Maps RenderPass parameters to GL parameters
3145
3143
  */
3146
3144
  setParameters(parameters = {}) {
3147
- const glParameters = {};
3145
+ const glParameters = { ...this.glParameters };
3148
3146
  if (this.props.framebuffer) {
3149
3147
  glParameters.framebuffer = this.props.framebuffer;
3150
3148
  }
@@ -3947,6 +3945,7 @@ var WEBGLRenderPipeline = class extends import_core17.RenderPipeline {
3947
3945
  vertexCount,
3948
3946
  // indexCount,
3949
3947
  instanceCount,
3948
+ isInstanced = false,
3950
3949
  firstVertex = 0,
3951
3950
  // firstIndex,
3952
3951
  // firstInstance,
@@ -3956,7 +3955,6 @@ var WEBGLRenderPipeline = class extends import_core17.RenderPipeline {
3956
3955
  const glDrawMode = getGLDrawMode(topology);
3957
3956
  const isIndexed = Boolean(vertexArray.indexBuffer);
3958
3957
  const glIndexType = (_a = vertexArray.indexBuffer) == null ? void 0 : _a.glIndexType;
3959
- const isInstanced = Number(instanceCount) > 0;
3960
3958
  if (this.linkStatus !== "success") {
3961
3959
  import_core17.log.info(2, `RenderPipeline:${this.id}.draw() aborted - waiting for shader linking`)();
3962
3960
  return false;
@@ -4044,7 +4042,7 @@ var WEBGLRenderPipeline = class extends import_core17.RenderPipeline {
4044
4042
  throw new Error(`Error during compilation of shader ${this.vs.id}`);
4045
4043
  }
4046
4044
  if (((_a = this.fs) == null ? void 0 : _a.compilationStatus) === "error") {
4047
- this.vs.debugShader();
4045
+ this.fs.debugShader();
4048
4046
  throw new Error(`Error during compilation of shader ${this.fs.id}`);
4049
4047
  }
4050
4048
  throw new Error(`Error during ${status}: ${this.device.gl.getProgramInfoLog(this.handle)}`);