I’m trying to obtain a smooth lighting effect on a solid with openGLES 2.0.
I exported an .obj solid from blender and converted the obj file in C array of vertex and normal (with obj2openGL – http://heikobehrens.net/2009/08/27/obj2opengl/
).Then I draw this data on my openGL ES app on iPhone.
The problem is that the faces of the solid have a flat lighting (the same color for each face). I want a smooth effect without using per fragment lighting.
I tried to increase the number of faces but with no results.
Is there a function on openGLES2.0 that control this effect (smooth vs flat lighting)?
I solved the problem. In order to export vertex normal in a .obj with blender 2.62 must be selected “shade smooth” (while in edit mode ctrl-F and choose shade mode). Hope this can help someone!. Thanks very much Christian, it was the easiest solution.