Skip to content

Commit

Permalink
feat: add wrapS & wrapT property of the framebuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
06wj committed May 20, 2021
1 parent ad90a22 commit eaae512
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/renderer/Framebuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ const Framebuffer = Class.create(/** @lends Framebuffer.prototype */ {
*/
magFilter: NEAREST,

/**
* texture wrapS
* @type {GLenum}
* @default gl.CLAMP_TO_EDGE
*/
wrapS: CLAMP_TO_EDGE,

/**
* texture wrapS
* @type {GLenum}
* @default gl.CLAMP_TO_EDGE
*/
wrapT: CLAMP_TO_EDGE,

/**
* texture data
* @type {TypedArray}
Expand Down Expand Up @@ -364,8 +378,8 @@ const Framebuffer = Class.create(/** @lends Framebuffer.prototype */ {
width: this.width,
height: this.height,
image: this.data,
wrapS: CLAMP_TO_EDGE,
wrapT: CLAMP_TO_EDGE
wrapS: this.wrapS,
wrapT: this.wrapT
});

const glTexture = texture.getGLTexture(state);
Expand Down

0 comments on commit eaae512

Please sign in to comment.