Navigation Menu

Skip to content

Commit

Permalink
better support for NPOT
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandoam committed Apr 11, 2012
1 parent f5ffc1f commit 4050949
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chesterGL/core.js
Expand Up @@ -650,7 +650,7 @@ chesterGL.prepareWebGLTexture = function (texture) {
console.log("gl error " + error);
result = false;
}
// gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
Expand All @@ -671,7 +671,7 @@ chesterGL.prepareWebGLTexture = function (texture) {
* @ignore
*/
chesterGL.defaultTextureHandler = function (path, img) {
if (chesterGL.webglMode) {
if (chesterGL.webglMode && !img.tex) {
img.tex = chesterGL.gl.createTexture();
}
var texture = chesterGL.assets['texture'][path];
Expand Down

0 comments on commit 4050949

Please sign in to comment.