Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Daylight::Daylight(GLenum light)
- {
- m_light = light;
- float diffuse[4] = { 0.75f, 0.75f, 0.75f, 1.0f };
- glLightfv(m_light, GL_DIFFUSE, diffuse);
- }
- Daylight::~Daylight()
- {
- }
- void Daylight::update(bool isEnabled)
- {
- if (!isEnabled)
- {
- glDisable(m_light);
- return;
- }
- GLfloat pos[4] = { m_x, m_y, m_z, m_w };
- glLightfv(m_light, GL_POSITION, pos);
- glEnable(m_light);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement