| 146 | | if (textureObject != 0) |
| 147 | | { |
| 148 | | textureObject->bind(); |
| 149 | | |
| | 146 | if (textureObject) |
| | 147 | { |
| | 148 | if (_image.valid() && getModifiedCount(contextID) != _image->getModifiedCount()) |
| | 149 | { |
| | 150 | // compute the internal texture format, this set the _internalFormat to an appropriate value. |
| | 151 | computeInternalFormat(); |
| | 152 | |
| | 153 | GLsizei new_width, new_height, new_numMipmapLevels; |
| | 154 | |
| | 155 | // compute the dimensions of the texture. |
| | 156 | computeRequiredTextureDimensions(state, *_image, new_width, new_height, new_numMipmapLevels); |
| | 157 | |
| | 158 | if (!textureObject->match(GL_TEXTURE_2D, new_numMipmapLevels, _internalFormat, new_width, new_height, 1, _borderWidth)) |
| | 159 | { |
| | 160 | Texture::releaseTextureObject(contextID, _textureObjectBuffer[contextID].get()); |
| | 161 | _textureObjectBuffer[contextID] = 0; |
| | 162 | textureObject = 0; |
| | 163 | } |
| | 164 | } |
| | 165 | } |
| | 166 | |
| | 167 | |
| | 168 | if (textureObject) |
| | 169 | { |
| | 170 | textureObject->bind(); |
| | 171 | |
| 205 | | this, contextID,GL_TEXTURE_2D,_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,0); |
| | 227 | this, contextID,GL_TEXTURE_2D,_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,_borderWidth); |
| 248 | | this, contextID,GL_TEXTURE_2D,_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,0); |
| | 270 | this, contextID,GL_TEXTURE_2D,_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,_borderWidth); |