How to calculate vertext normals for a mesh in Java in OpenGL ES application?
- by alan mc
Can some one point me to Java code ( in Java not C or C++) that calculates all the normals for all the vertices of a mesh for OpenGL ES application. I need this for lighting. Lets say I have a cube with following vertices and indices:
float vertices[] = { -width, -height, -depth, // 0
width, -height, -depth, // 1
…