Author: DigiBen
This tutorial shows how to do per-pixel lighting with a shader. Per-pixel lighting is the process of using the standard lighting calculation to calculate a lit color value at each pixel that is rendered to the frame buffer. To demonstrate per-pixel lighting, the tutorial draws a lit sphere with one light using diffuse, specular and ambient in the lighting equation.
Functions Used: glEnable(), gluNewQuadric(), gluQuadricDrawStyle(), glTranslatef(), gluSphere(), gluDeleteQuadric(), glLoadIdentity(), gluLookAt(), glDisable(), glCreateShaderObjectARB(), glShaderSourceARB(), glCompileShaderARB(), glCreateProgramObjectARB(), glAttachObjectARB(), glLinkProgramARB(), glUseProgramObjectARB(), glGetUniformLocationARB(), glDetachObjectARB(), glDeleteObjectARB(), glGetString(), wglGetProcAddress()
purchase full version
Access EXE