Hi guys, I would like to add the lighting to the rendered cube (I got from http://heikobehrens.net/2009/08/27/obj2opengl/) but when I started the apps, I got black screen. Does anybody know what's matter? here are my snippet codes. Thanks for any helps

//CubeShaders.h static const char* cubeMeshVertexShader = " \ \ attribute vec4 vertexPosition; \ attribute vec4 vertexNormal; \ attribute vec2 vertexTexCoord; \ attribute vec4 a_color; \ \ varying vec2 texCoord; \ varying vec4 normal; \ varying vec4 v_color; \ \ uniform mat4 modelViewProjectionMatrix; \ uniform mat4 u_MVMatrix; \ uniform vec3 u_lightPos; \ \ void main() \ { \ gl_Position = modelViewProjectionMatrix * vertexPosition; \ vec3 modelViewVertex = vec3 (u_MVMatrix * vertexPostition); \ vec3 modelViewNormal = vec3 (u_MVMatrix * vertexNormal); \ float distance = length(u_lightPos - modelViewVertex); \ vec3 lightVector = normalize(u_lightPos - modelViewVertex); \ float diffuse = max(dot(modelViewNormal, ligthVector), 0.1); \ diffuse = diffuse * (1.0/(0.25*distance*distance))); \ v_color = a_color * diffuse; \ normal = vertexNormal; \ texCoord = vertexTexCoord; \ } "; static const char* cubeFragmentShader = " \ \ precision mediump float; \ \ varying vec2 texCoord; \ varying vec4 normal; \ varying vec4 v_color; \ \ uniform sampler2D texSampler2D; \ \ void main() \ { \ gl_FragColor = v_color; \ } \ "; //Some handles vertexHandle = glGetAttribLocation(shaderProgramID, "vertexPosition"); normalHandle = glGetAttribLocation(shaderProgramID, "vertexNormal"); textureCoordHandle = glGetAttribLocation(shaderProgramID, "vertexTexCoord"); mvpMatrixHandle = glGetUniformLocation(shaderProgramID, "modelViewProjectionMatrix"); texSampler2DHandle = glGetUniformLocation(shaderProgramID, "texSampler2D"); mMVMatrixHandle = glGetUniformLocation(shaderProgramID, "u_MVMatrix"); mLightPosHandle = glGetUniformLocation(shaderProgramID, "u_LightPos"); mColorHandle = glGetAttribLocation(shaderProgramID, "a_Color"); // LightPos QCAR::Matrix44F mLightModelMatrix = SampleMath::Matrix44FIdentity(); QCAR::Matrix44F mLightPosInModelSpace = SampleMath::Matrix44FIdentity(); SampleUtils::translatePoseMatrix(0.5f, 0.5f, -3.0f, &mLightModelMatrix.data[0]); SampleUtils::multiplyMatrix(&mLightModelMatrix.data[0], &mLightPosInModelSpace.data[0] , &mLightPosInWorldSpace.data[0]); SampleUtils::multiplyMatrix(&modelViewMatrix.data[0], &mLightPosInWorldSpace.data[0] , &mLightPosInEyeSpace.data[0]); // Pass in LightPos to programShader glUniform3f(mLightPosHandle, mLightPosInEyeSpace.data[12], mLightPosInEyeSpace.data[13], mLightPosInEyeSpace.data[14]);

I have been looking for the linked tutorial on basic diffuse lighting, but it seems to have been removed.

Is there a new location to access it? I would really appreciate if that content was available, since there are many links to it floating around but they all lead to nothing, it's very frustrating and I have spent days trying to get my diffuse lighting right...