Hi, ;D
im a bit frustated >:( about the fact that i cant get
any Quad / Triangle working with VertexBuffers
and NormalBuffers, and all other buffers like ColorBuffers.
Is it common that the following Code produce a VM crash ?
GL.glColor3f(1.0f,1.0f,1.0f);
GL.glLoadIdentity();
GL.glTranslatef(0f,0.0f,-10.0f);
// GL.glEnable(GL.GL_TEXTURE_2D);
GL.glDisable(GL.GL_LIGHTING);
GL.glEnableClientState(GL.GL_VERTEX_ARRAY);
// GL.glEnableClientState(GL.GL_NORMAL_ARRAY);
GL.glVertexPointer(4,GL.GL_FLOAT,vertexBuffer);// umwandeln der Vertex Pointer in floafBuffer !
GL.glDrawElements(GL.GL_QUADS,indexesBuffer); //<- makes my VM crash
GL.glDisableClientState(GL.GL_VERTEX_ARRAY);
I have disabled ligthing and set the Lighting Color to white. Now i moved the GL.glDrawElement( method behind GL.glDisableClientState(GL.GL_VERTEX_ARRAY);
and the Code work, but i see nowthing at all.
Now my Question : Must the glDrawElements called between the enabled Client States ? Or can it be done after the Vertex Pointer was comited to the Gfx Card,and the client state is disabled ?
Sorry for such stupid question again. but i see nothing or my VM crashes.
Thx 4 helping again.