Skip to content

Commit

Permalink
chore: Address comments on #1992
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Mar 7, 2024
1 parent db20629 commit d718f4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api-reference/core/resources/render-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Deletes resources held by pipeline. Note: Does not currently delete shaders (to
Main parameters

- `uniforms`=`{}` - a map of uniforms that will be set just before the draw call (and remain set after the call).
- `bindings`=`{}` - a map of texture `Sampler`s that will be bound before the draw call.
- `bindings`=`{}` - a map of `TextureViews`, `Samplers` and uniform `Buffers` that will be bound before the draw call.
- `parameters` - temporary gl settings to be applied to this draw call.
- `transformFeedback`=`null` - optional `TransformFeedback` object containing buffers that will receive the output of the transform feedback operation.

Expand Down
4 changes: 3 additions & 1 deletion modules/webgl/src/adapter/resources/webgl-render-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,16 @@ export class WEBGLRenderPipeline extends RenderPipeline {
// Note: async textures set as uniforms might still be loading.
// Now that all uniforms have been updated, check if any texture
// in the uniforms is not yet initialized, then we don't draw
if (!this._areTexturesRenderable() || vertexCount === 0) {
if (!this._areTexturesRenderable()) {
log.info(2, `RenderPipeline:${this.id}.draw() aborted - textures not yet loaded`)();
// Note: false means that the app needs to redraw the pipeline again.
return false;
}

// (isInstanced && instanceCount === 0)
// if (vertexCount === 0) {
// log.info(2, `RenderPipeline:${this.id}.draw() aborted - no vertices to draw`)();
// Note: false means that the app needs to redraw the pipeline again.
// return true;
// }

Expand Down

0 comments on commit d718f4b

Please sign in to comment.