本文整理汇总了C++中PointLight::GetDiffuse方法的典型用法代码示例。如果您正苦于以下问题:C++ PointLight::GetDiffuse方法的具体用法?C++ PointLight::GetDiffuse怎么用?C++ PointLight::GetDiffuse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointLight
的用法示例。
在下文中一共展示了PointLight::GetDiffuse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAllPointLights
void Scene::UpdateAllPointLights()
{
int size = m_pointLightList.size();
LowLevelGraphics::ShaderProgram::UpdateGlobalShaderParameter(LowLevelGraphics::POINTLIGHTSSIZE, &size, SHADER_INT);
//PointLight* light = m_pointLightList.at(0)
//LowLevelGraphics::ShaderProgram::UpdateGlobalShaderParameter(LowLevelGraphics::POINTLIGHTSDIFFUSE, &(light->GetDiffuse()), SHADER_LIGHT_DIFFUSE);
for(int i = 0; i<m_pointLightList.size(); i++)
{
PointLight* light = m_pointLightList.at(i);
float rad = light->GetRadius();
LowLevelGraphics::ShaderProgram::UpdateGlobalShaderParameter(LowLevelGraphics::POINTLIGHTSDIFFUSE, &(light->GetDiffuse()), i, SHADER_LIGHT_DIFFUSE);
LowLevelGraphics::ShaderProgram::UpdateGlobalShaderParameter(LowLevelGraphics::POINTLIGHTSAMBIENT, &(light->GetAmbient()), i, SHADER_LIGHT_AMBIENT);
LowLevelGraphics::ShaderProgram::UpdateGlobalShaderParameter(LowLevelGraphics::POINTLIGHTSSPECULAR, &(light->GetSpecular()), i, SHADER_LIGHT_SPECULAR);
LowLevelGraphics::ShaderProgram::UpdateGlobalShaderParameter(LowLevelGraphics::POINTLIGHTSRADIUS, &rad, i, SHADER_LIGHT_RADIUS);
LowLevelGraphics::ShaderProgram::UpdateGlobalShaderParameter(LowLevelGraphics::POINTLIGHTSTRANSFORM, &(light->GetTransform()->GetMatrix()), i, SHADER_LIGHT_TRANSFORM);
}
}