775 if (!ctx->
Light.Enabled) {
785 if (ctx->
Light.Light[
i].Enabled) {
792 prev_enabled = &ctx->
Light.Light[
i];
797 for (side=0; side<2; side++) {
798 ctx->
Light.BaseColor[side][0] = ctx->
Light.Material[side].Emission[0]
799 + ctx->
Light.Model.Ambient[0] * ctx->
Light.Material[side].Ambient[0];
800 ctx->
Light.BaseColor[side][1] = ctx->
Light.Material[side].Emission[1]
801 + ctx->
Light.Model.Ambient[1] * ctx->
Light.Material[side].Ambient[1];
802 ctx->
Light.BaseColor[side][2] = ctx->
Light.Material[side].Emission[2]
803 + ctx->
Light.Model.Ambient[2] * ctx->
Light.Material[side].Ambient[2];
804 ctx->
Light.BaseColor[side][3]
805 =
MIN2( ctx->
Light.Material[side].Diffuse[3], 1.0F );
811 for (side=0; side<2; side++) {
814 ctx->
Light.BaseColor[side][0] +=
light->Ambient[0] *
mat->Ambient[0];
815 ctx->
Light.BaseColor[side][1] +=
light->Ambient[1] *
mat->Ambient[1];
816 ctx->
Light.BaseColor[side][2] +=
light->Ambient[2] *
mat->Ambient[2];
818 light->MatAmbient[side][0] =
light->Ambient[0] *
mat->Ambient[0];
819 light->MatAmbient[side][1] =
light->Ambient[1] *
mat->Ambient[1];
820 light->MatAmbient[side][2] =
light->Ambient[2] *
mat->Ambient[2];
822 light->MatDiffuse[side][0] =
light->Diffuse[0] *
mat->Diffuse[0];
823 light->MatDiffuse[side][1] =
light->Diffuse[1] *
mat->Diffuse[1];
824 light->MatDiffuse[side][2] =
light->Diffuse[2] *
mat->Diffuse[2];
826 light->MatSpecular[side][0] =
light->Specular[0] *
mat->Specular[0];
827 light->MatSpecular[side][1] =
light->Specular[1] *
mat->Specular[1];
828 light->MatSpecular[side][2] =
light->Specular[2] *
mat->Specular[2];
836 light->h_inf_norm[2] += 1.0F;
844 + 0.59F *
light->Diffuse[1]
845 + 0.11F *
light->Diffuse[2];
847 + 0.59F *
light->Specular[1]
848 + 0.11F *
light->Specular[2];
855 if ( ctx->
Light.BaseColor[0][0]<0.0F
856 || ctx->
Light.BaseColor[0][1]<0.0F
857 || ctx->
Light.BaseColor[0][2]<0.0F
858 || ctx->
Light.BaseColor[0][3]<0.0F
859 || ctx->
Light.BaseColor[1][0]<0.0F
860 || ctx->
Light.BaseColor[1][1]<0.0F
861 || ctx->
Light.BaseColor[1][2]<0.0F
862 || ctx->
Light.BaseColor[1][3]<0.0F
863 || ctx->
Light.Model.LocalViewer
864 || ctx->
Light.ColorMaterialEnabled) {
869 if (
light->Position[3]!=0.0F
870 ||
light->SpotCutoff!=180.0F
871 ||
light->MatDiffuse[0][0]<0.0F
872 ||
light->MatDiffuse[0][1]<0.0F
873 ||
light->MatDiffuse[0][2]<0.0F
874 ||
light->MatSpecular[0][0]<0.0F
875 ||
light->MatSpecular[0][1]<0.0F
876 ||
light->MatSpecular[0][2]<0.0F
877 ||
light->MatDiffuse[1][0]<0.0F
878 ||
light->MatDiffuse[1][1]<0.0F
879 ||
light->MatDiffuse[1][2]<0.0F
880 ||
light->MatSpecular[1][0]<0.0F
881 ||
light->MatSpecular[1][1]<0.0F
882 ||
light->MatSpecular[1][2]<0.0F) {
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum light
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define COPY_3V(DST, SRC)
struct gl_light * NextEnabled
struct gl_light_attrib Light