mirror of https://github.com/axmolengine/axmol.git
Clean possible GL error
CHECK_GL_ERROR_DEBUG work debug only. Clean need for correct check glTexImage2D and glCompressedTexImage2D Release now work: If gl error before any code, initWithMipmaps return false always
This commit is contained in:
parent
a8471dd507
commit
133be7e57f
|
@ -637,7 +637,12 @@ bool Texture2D::initWithMipmaps(MipmapInfo* mipmaps, int mipmapsNum, PixelFormat
|
|||
}
|
||||
#endif
|
||||
|
||||
CHECK_GL_ERROR_DEBUG(); // clean possible GL error
|
||||
// clean possible GL error
|
||||
GLenum err = glGetError();
|
||||
if (err != GL_NO_ERROR)
|
||||
{
|
||||
cocos2d::log("OpenGL error 0x%04X in %s %s %d\n", err, __FILE__, __FUNCTION__, __LINE__);
|
||||
}
|
||||
|
||||
// Specify OpenGL texture image
|
||||
int width = pixelsWide;
|
||||
|
|
Loading…
Reference in New Issue