Seems that everyone agrees that this is broken and and you need to get rid of GLKBaseEffect to stop it leaking. But no one mentions what you'd replace it with.
Can someone can point me in the right direction? Some sample code or a tutorial would be amazingly useful!
I'm doing very basic stuff, just drawing 2D sprites. Works great apart from all the leaks :p
I just need to know what prepareToDraw is doing and replace it with some code that works. All the tutorials I've found seem to focus on 3D rendering...
Could I use OpenGL ES1 instead of 2 perhaps?
//---Sprite drawing code ----------------------
effect.transform.modelviewMatrix = viewMatrix;
effect.texture2d0.name = textureInfo.name;
effect.texture2d0.envMode = GLKTextureEnvModeReplace;
// LEAK Here
[effect prepareToDraw];
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnableVertexAttribArray(GLKVertexAttribPosition);
glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, 0, vertices);
glEnableVertexAttribArray(GLKVertexAttribTexCoord0);
glVertexAttribPointer(GLKVertexAttribTexCoord0, 2, GL_FLOAT, GL_FALSE, 0, textureVerts);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableVertexAttribArray(GLKVertexAttribPosition);
glDisableVertexAttribArray(GLKVertexAttribTexCoord0);
glDisable(GL_BLEND);