i have upload a model with the following model loader in my Opengles code in ios.
http://bill.dudney.net/roller/objc/entry/wave_front_obj_textures_working
now the problem is that when i want to draw a cube along with this model loader with following code
const GLfloat floorVertices[] = {
-1.0, 1.0, 0.0, // Top left
-1.0, -1.0, 0.0, // Bottom left
1.0, -1.0, 0.0, // Bottom right
1.0, 1.0, 0.0 // Top right
};
glVertexPointer(3, GL_FLOAT, 0, floorVertices);
glEnableClientState(GL_VERTEX_ARRAY);
glRotatef(90.0, 0.0, 1.0, 0.0);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
it crashes on glDrawArrays(GL_TRIANGLE_FAN, 0, 4) with EXC_BAD_ACCESS error
i have searched this problem over internet but can't simple solution or explanation. here is another question about it but i cannot get his answer due to lack of knowledge about opengles.
glDrawArrays crash with EXC_BAD_ACCESS.
Can anyone have solution of this problem or simple explanation of already asked question. thanks in advance