Skip to content

Commit d4809cc

Browse files
authored
Fix issues with retained mode rendering and image light (#7384)
1 parent 27f7624 commit d4809cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/webgl/p5.RendererGL.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,8 @@ class RendererGL extends Renderer {
665665
if (!glBuffers) return;
666666

667667
if (glBuffers.indexBuffer) {
668+
this._bindBuffer(glBuffers.indexBuffer, gl.ELEMENT_ARRAY_BUFFER);
669+
668670
// If this model is using a Uint32Array we need to ensure the
669671
// OES_element_index_uint WebGL extension is enabled.
670672
if (
@@ -2037,9 +2039,8 @@ class RendererGL extends Renderer {
20372039
this.shader(this.states.diffusedShader);
20382040
this.states.diffusedShader.setUniform('environmentMap', input);
20392041
this.states.doStroke = false;
2040-
this.rectMode(constants.CENTER);
20412042
this.noLights();
2042-
this.rect(0, 0, width, height);
2043+
this.plane(width, height);
20432044
});
20442045
this.diffusedTextures.set(input, newFramebuffer);
20452046
return newFramebuffer;

0 commit comments

Comments
 (0)