   Texture projection for a flashlight
  I have google the net but I can't find any good tutorial or easy explaination for how to create a flashlight using texture projection or something.I don't want to use any hardware specefic extensions. GLSL would be interesting altough I have never used it.   
Read this and the next post by Yann.;  Thank you.if I understand correct it would be something like this to create a flashlight using texture projection:// Bind texture...// Calculate projection matrixCMatrix texProj, camView, camProj, bias(0.5,0.0,0.0,0.0, 0.0,0.5,0.0,0.0, 0.0,0.0,0.5,0.0, 0.5,0.5,0.5,1.0);camView = Camera->getMatrix(MODELVIEW);camProj = Camera->getMatrix(PROJECTION);texProj = camView * camProj * bias;glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);glTexGenfv(GL_S, GL_EYE_PLANE, texProj.getRow(0));glEnable(GL_TEXTURE_GEN_S);glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);glTexGenfv(GL_T, GL_EYE_PLANE, texProj.getRow(1));glEnable(GL_TEXTURE_GEN_T);glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);glTexGenfv(GL_R, GL_EYE_PLANE, texProj.getRow(2));glEnable(GL_TEXTURE_GEN_R);glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);glTexGenfv(GL_Q, GL_EYE_PLANE, texProj.getRow(3));glEnable(GL_TEXTURE_GEN_Q);// Draw objects...