I’m getting an OpenGL error 0x0502 when loading my tile map.
OpenGL error 0x0502 in \cocos2d-2.1rc0-x-2.1.3\cocos2dx\textures\cctextureatlas.cpp cocos2d::CCTextureAtlas::drawNumberOfQuads 681
I tested it in the TestCpp project and it happens there too. It turns out the actual error is in CCTMXLayer::parseInternalProperties() when a CCTMXLayer has cc_vertexz == automatic.
The GL error happens in the setUniformLocationWith1f() call.
The issue can be reproduced by running the “TMX Iso VertexZ” or “TMX Ortho vertexZ” tests.
I’m having the same issue. Has anyone figured out how to fix this? (it works fine if I remove setUniformLocationWith1f()…except I can’t set my uniforms)
Actually, I think this might be a non-issue. As far as I know (and I don’t know very much about opengl), you need to have a shader loaded/“used” in order to set uniforms for it. That may be incorrect though, does anybody know? It fixed my problems.