diff --git a/cocos2d/core/CCConfiguration.js b/cocos2d/core/CCConfiguration.js index e87b9acdfb..ce9b6d1943 100644 --- a/cocos2d/core/CCConfiguration.js +++ b/cocos2d/core/CCConfiguration.js @@ -244,7 +244,7 @@ cc.configuration = /** @lends cc.configuration# */{ this._supportsPVRTC = this.checkForGLExtension("GL_IMG_texture_compression_pvrtc"); locValueDict["gl.supports_PVRTC"] = this._supportsPVRTC; - this._supportsNPOT = false; //true; + this._supportsNPOT = true; locValueDict["gl.supports_NPOT"] = this._supportsNPOT; this._supportsBGRA8888 = this.checkForGLExtension("GL_IMG_texture_format_BGRA888"); diff --git a/cocos2d/core/textures/CCTexture2D.js b/cocos2d/core/textures/CCTexture2D.js index 1ca8fbb2d5..2d59900681 100644 --- a/cocos2d/core/textures/CCTexture2D.js +++ b/cocos2d/core/textures/CCTexture2D.js @@ -352,7 +352,7 @@ var Texture2D = cc.Class(/** @lends cc.Texture2D# */{ * @param {Number} pixelFormat * @param {Number} pixelsWidth * @param {Number} pixelsHeight - * @param {Size} contentSize + * @param {Size} contentSize contentSize is deprecated and ignored * @return {Boolean} */ initWithData: function (data, pixelFormat, pixelsWidth, pixelsHeight, contentSize) { @@ -860,8 +860,8 @@ game.once(game.EVENT_RENDERER_INITED, function () { opts.width = pixelsWidth; opts.height = pixelsHeight; this.update(opts); - this.width = contentSize.width; - this.height = contentSize.height; + this.width = pixelsWidth; + this.height = pixelsHeight; this.loaded = true; this.emit("load"); return true; diff --git a/cocos2d/render-texture/CCRenderTextureWebGLRenderCmd.js b/cocos2d/render-texture/CCRenderTextureWebGLRenderCmd.js index e2768b6a7d..f831cff960 100644 --- a/cocos2d/render-texture/CCRenderTextureWebGLRenderCmd.js +++ b/cocos2d/render-texture/CCRenderTextureWebGLRenderCmd.js @@ -172,7 +172,7 @@ proto.initWithWidthAndHeight = function(width, height, format, depthStencilForma if (!node._texture) return false; - locTexture.initWithData(data, node._pixelFormat, powW, powH, cc.size(width, height)); + locTexture.initWithData(data, node._pixelFormat, powW, powH); //free( data ); var oldRBO = gl.getParameter(gl.RENDERBUFFER_BINDING); @@ -181,7 +181,7 @@ proto.initWithWidthAndHeight = function(width, height, format, depthStencilForma this._textureCopy = new cc.Texture2D(); if (!this._textureCopy) return false; - this._textureCopy.initWithData(data, node._pixelFormat, powW, powH, cc.size(width, height)); + this._textureCopy.initWithData(data, node._pixelFormat, powW, powH); } // generate FBO