I feel like an idiot. What im trying to do is light a terrain using per-surface shading. Ive looked in MANY other posts and sites but none of them clear up my confusion, maybe you can help.

To draw my terrain I use triangle strips but only declare 2 verticies, to be honest I dont know how you get a triangle from 2 vertices but its on most sites and it works so I use it.

Ive read to get normals to get a 2 vectors from 3 different verticies on a triangle, but im confused. You’re supposed to do v[0] = v1 - v2 and so on. But I thought a vertice consisted of 3 variables - a x, y, and z coord. So how would you subtract 2 vertices consisting of 3 coords each?!?! or is it supposed to be v[0] = x - y: like that?

Ill do whatever it takes; if you think posting my code up here would help let me know!

v = v1 - v2 means, that v, v1 and v2 are vectors. So v, v1 and v2 each consist of x, y and z. Using C++ you could define e.g. a vector class and do operations on it (like v = v1 - v2).
Otherwise, do this for each component (x, y and z).

Having those two vectors you calculate the cross product and get the vector standing perpendicular on those two… maybe thats the normal vector you wanted. But if you want a smoothed terrain, you have to average the vector between all triangles using that point.

A vector in 3d is an ordered triple of components (x, y, z). You add or subtract two vectors by adding or subtracting their respective components. A vertex in OpenGL is represented by a vector from the origin (0, 0, 0) to a point in space (x, y, z). To get a normal to a triangle face defined by 3 vertices let’s say a = (x1, y1, z1), b = (x2, y2, z2) and c (x3, y3, z3), you have to calculate vectors that form the edges of the triangle. You do that by subtracting a from b and c. The two vectors you get are d = b - a = (x2 - x1, y2 - y1, z2 - z1) and e = c - a = (x3 - x1, y3 - y1, z3 - z1). To calculate a surface normal, you have to take a cross product of vectors d and e, which is a vector perpendicular to both of them.