Generating Smooth Normals from active Vertex Array
问题 I'm attempting to hack and modify several rendering features of an old opengl fixed pipeline game, by hooking into OpenGl calls, and my current mission is to implement shader lighting. I've already created an appropriate shader program that lights most of my objects correctly, but this game's terrain is drawn with no normal data provided. The game calls: void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); and void glDrawElements(GLenum mode, GLsizei count,