I am working on an object (OBJ File) loader for my app on iOS, currently I have successfully read the vertices and the faces of the object, and I am now just adding colours to the imported models.
I am coming across a major problem now. Out of a cube with six faces, all coloured red apart from two opposite faces which are coloured blue. This cube is set to rotate so I can see all sides, but the colours do not appear correctly as shown in the video below:
The blue faces only shows when the two blue sections overlap, I cannot figure out why - I am used to OpenGL for PC, is there something I am missing which is causing this strange colouring?
The colouring is achieved by sending a large float array of the format RGBA RGBA RGBA etc for each vertex;
// colours is the name of the array of floats glColorPointer(colorStride, GL_FLOAT, 0, colors); glEnableClientState(GL_COLOR_ARRAY); glDrawArrays(renderStyle, 0, vertexCount);
Any help you can offer would be great,
Even if you don't know the problem, but have seen this before and know what it may be that would help as I have no idea where to even start looking as it is!