I am rendering with this code. If light is disabled a get colors, for example red. If I enable light and shading there is no colors. Is this behavior correct?
85 void Geometry::render(State &state){
86
87
88 glEnable(GL_VERTEX_ARRAY);
89 glEnableClientState(GL_COLOR_ARRAY);
90 glEnableClientState(GL_NORMAL_ARRAY);
91 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
92
93 //TODO bind texture
94 glTexCoordPointer(2, GL_FLOAT,0,&m_textureCoordinates[0]);
95 glColorPointer(3, GL_FLOAT,0,&m_vertexColors[0]);
96 glNormalPointer(GL_FLOAT,0,&m_normals[0]);
97 glVertexPointer(3 ,GL_FLOAT,0,&m_vertices[0]);
98
99 glDrawArrays(GL_TRIANGLES,0,m_vertices.size());
100
101 glDisable(GL_VERTEX_ARRAY);
102 glDisable(GL_COLOR_ARRAY);
103 glDisable(GL_NORMAL_ARRAY);
104 glDisable(GL_TEXTURE_COORD_ARRAY);
105 }