I'm trying to draw translucent polygons using GLKit, but with no luck. So I was wondering if it's even possible to have translucent polygons in GLKit in the first place, since I know it's not supported in the standard implementation of OpenGL; but can be mimicked using custom shaders. But since GLKit compiles it's own shader, I need to know if I should continue to use GLKit or use my own custom shader. My code is below:
// setup states
glEnable(GL_BLEND);
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
self.effect.texture2d0.enabled = GL_FALSE;
self.effect.colorMaterialEnabled = GL_TRUE;
self.effect.transform.modelviewMatrix = self.modelMatrix;
glEnableVertexAttribArray(GLKVertexAttribPosition);
glEnableVertexAttribArray(GLKVertexAttribColor);
[self.effect prepareToDraw];
// draw triangles
glVertexAttribPointer(GLKVertexAttribPosition, 3, GL_FLOAT, GL_FALSE, sizeof(LineVertex), &_vertices[0].pos);
glVertexAttribPointer(GLKVertexAttribColor, 4, GL_FLOAT, GL_FALSE, sizeof(LineVertex), &_vertices[0].color);
glDrawArrays(GL_TRIANGLES, 0, _vertexCount);
Thanks in advance.