calculate normal matrix once in cpp (performance),
added bool variable to turn light on/off (still needs button),
This commit is contained in:
@@ -226,7 +226,8 @@ void OglViewerWidget::paintGL()
|
||||
// Set view-projection matrix
|
||||
m_program.setUniformValue("vp_matrix", m_projection * view);
|
||||
|
||||
// Set Light
|
||||
// Set Light values
|
||||
m_program.setUniformValue("b_light", m_lightOn);
|
||||
m_program.setUniformValue("light.position", m_light.position);
|
||||
m_program.setUniformValue("light.intensities", m_light.intensities);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user