Skip to content

Commit

Permalink
fix(webgl): Update video texture bindings before draw (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy authored Nov 30, 2023
1 parent ecfcc1a commit 42a1c87
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions modules/webgl/src/adapter/resources/webgl-render-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export class WEBGLRenderPipeline extends RenderPipeline {
/** WebGL varyings */
varyings: string[] | null = null;

_textureUniforms: Record<string, any> = {};
_textureIndexCounter: number = 0;
_uniformCount: number = 0;
_uniformSetters: Record<string, Function> = {}; // TODO are these used?

Expand Down Expand Up @@ -348,16 +346,9 @@ export class WEBGLRenderPipeline extends RenderPipeline {
_areTexturesRenderable() {
let texturesRenderable = true;

for (const [, texture] of Object.entries(this._textureUniforms)) {
texture.update();
texturesRenderable = texturesRenderable && texture.loaded;
}

for (const [, texture] of Object.entries(this.bindings)) {
// texture.update();
// @ts-expect-error
if (texture.loaded !== undefined) {
// @ts-expect-error
if (texture instanceof WEBGLTexture) {
texture.update();
texturesRenderable = texturesRenderable && texture.loaded;
}
}
Expand Down

0 comments on commit 42a1c87

Please sign in to comment.