Skip to content

Commit 25a711b

Browse files
authored
Merge pull request #2 from davepagurek/feat/mipmap
Fix tests
2 parents 07371e8 + 0860bd7 commit 25a711b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/webgl/p5.Texture.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ p5.Texture = class Texture {
347347
}
348348

349349
glFilter(filter) {
350+
const gl = this._renderer.GL;
350351
if (filter === constants.NEAREST) {
351352
return gl.NEAREST;
352353
} else {
@@ -461,6 +462,7 @@ export class MipmapTexture extends p5.Texture {
461462
}
462463

463464
glFilter(_filter) {
465+
const gl = this._renderer.GL;
464466
// TODO: support others
465467
return gl.LINEAR_MIPMAP_LINEAR;
466468
}

src/webgl/shaders/webgl2Compatibility.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ out vec4 outColor;
2020
#define TEXTURE texture2D
2121

2222
#ifdef FRAGMENT_SHADER
23-
#define OUT_COLOR OUT_COLOR
23+
#define OUT_COLOR gl_FragColor
2424
#endif
2525

2626
#endif

0 commit comments

Comments
 (0)