mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 04:33:31 +00:00
Optimized setTextureFilter
This commit is contained in:
parent
d799c06031
commit
a26f827650
1 changed files with 4 additions and 1 deletions
|
@ -2963,7 +2963,9 @@ var WebGLRenderer = new Class({
|
|||
if (width > 0 && height > 0)
|
||||
{
|
||||
gl.activeTexture(gl.TEXTURE0);
|
||||
|
||||
var currentTexture = gl.getParameter(gl.TEXTURE_BINDING_2D);
|
||||
|
||||
gl.bindTexture(gl.TEXTURE_2D, dstTexture);
|
||||
|
||||
if (flipY)
|
||||
|
@ -3086,7 +3088,8 @@ var WebGLRenderer = new Class({
|
|||
setTextureFilter: function (texture, filter)
|
||||
{
|
||||
var gl = this.gl;
|
||||
var glFilter = [ gl.LINEAR, gl.NEAREST ][filter];
|
||||
|
||||
var glFilter = (filter === 0) ? gl.LINEAR : gl.NEAREST;
|
||||
|
||||
gl.activeTexture(gl.TEXTURE0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue