#ifndef HGL_GRAPH_LIGHT_INCLUDE #define HGL_GRAPH_LIGHT_INCLUDE #include #include namespace hgl { namespace graph { enum LightMode { lmNone = 0, lmVertex, lmPixel, lmEnd };//enum LightMode /** * 光源类型 */ enum LightType { ltNone=0, ///<起始定义,无意义 ltSunLight, ///<太阳光 ltPoint, ///<点光源 ltDirection, ///<方向光 ltSpot, ///<聚光灯 ltInfiniteSpotLight,///<无尽聚光灯 ltAreaQuad, ///<四边形面光源 ltEnd ///<结束定义,无意义 };//enum LightType /** * 灯光 */ struct Light { LightType type; ///<光源类型 bool enabled; ///<是否开启 Color4f ambient; ///<环境光 Color4f specular; ///<镜面光 Color4f diffuse; ///<漫反射 };//struct Light /** * 太阳光 */ struct SunLight :public Light { Vector3f direction; }; /** * 方向光 */ struct DirectionLight:public Light { Vector3f direction; ///<方向 float nDotVP; ///