Hello forum,
I’m an absolute beginner and OpenGL is giving me issues with array element 0 of one of my (very simple) Vertex Arrays.
The relevant (or what i believe to be relevant) code is this:
void ground()
{
//create the vertex array
triple groundVertex[4] = {{45.0, 0.0, 45} , {45.0, 0.0, -45.0} ,{-45.0,0.0,-45} , {-45.0,0.0,45.0}
};
glVertexPointer(3,GL_FLOAT, 0, groundVertex);
glBegin(GL_QUADS);
glArrayElement(0);
glArrayElement(1);
glArrayElement(2);
glArrayElement(3);
glEnd();
}
When I compile it seems to throw this error at me.
“Unhandled exception at 0x692eada6 in wk7.exe: 0xC0000005: Access violation reading location 0x00000004.”
And when i break it seems to point to Array Element 0.
I cannot think of what it could be.