OpenGL front/back detection is based on winding, not the normal. The normal vector does not have any effect on whether the polygon is considered front or back facing.
I think what you want to do is set the GL_LIGHT_MODEL_TWO_SIDE
option of glLightModel.
GL_LIGHT_MODEL_TWO_SIDE
params is a single integer or floating-point value that specifies
whether one- or two-sided lighting calculations are done for polygons.
It has no effect on the lighting calculations for points,
lines,
or bitmaps.
If params is 0 (or 0.0), one-sided lighting is specified,
and only the front material parameters are used in the
lighting equation.
Otherwise, two-sided lighting is specified.
In this case, vertices of back-facing polygons are lighted
using the back material parameters
and have their normals reversed before the lighting equation is evaluated.
Vertices of front-facing polygons are always lighted using the
front material parameters,
with no change to their normals. The initial value is 0.
Note that this only applies to the fixed pipeline.
===EDIT===
Using custom shaders (GLES2.0 or OpenGL3+), then in the fragment shader you have access to the special boolean gl_FrontFacing
. To emulate two sided lighting in a shader just test for gl_FrontFacing
and multiply normal by negative one if false
.