void Tutorial18::KeyboardCB(OGLDEV_KEY OgldevKey, OGLDEV_KEY_STATE OgldevKeyState) { switch (OgldevKey) { case OGLDEV_KEY_ESCAPE: case OGLDEV_KEY_q: GLUTBackendLeaveMainLoop(); break; case OGLDEV_KEY_a: m_directionalLight.AmbientIntensity += 0.05f; break; case OGLDEV_KEY_s: m_directionalLight.AmbientIntensity -= 0.05f; break; case OGLDEV_KEY_z: m_directionalLight.DiffuseIntensity += 0.05f; break; case OGLDEV_KEY_x: m_directionalLight.DiffuseIntensity -= 0.05f; break; } }
virtual void KeyboardCB(OGLDEV_KEY OgldevKey) { switch (OgldevKey) { case OGLDEV_KEY_ESCAPE: case OGLDEV_KEY_q: GLUTBackendLeaveMainLoop(); break; case OGLDEV_KEY_PLUS: m_tessellationLevel += 1.0f; break; case OGLDEV_KEY_MINUS: if (m_tessellationLevel >= 2.0f) { m_tessellationLevel -= 1.0f; } break; case OGLDEV_KEY_z: m_isWireframe = !m_isWireframe; if (m_isWireframe) { glPolygonMode(GL_FRONT, GL_LINE); } else { glPolygonMode(GL_FRONT, GL_FILL); } break; default: m_pGameCamera->OnKeyboard(OgldevKey); } }
virtual void KeyboardCB(OGLDEV_KEY OgldevKey) { switch (OgldevKey) { case OGLDEV_KEY_ESCAPE: case OGLDEV_KEY_q: GLUTBackendLeaveMainLoop(); break; case 'a': m_directionalLight.AmbientIntensity += 0.05f; break; case 's': m_directionalLight.AmbientIntensity -= 0.05f; break; case 'z': m_directionalLight.DiffuseIntensity += 0.05f; break; case 'x': m_directionalLight.DiffuseIntensity -= 0.05f; break; default: m_pGameCamera->OnKeyboard(OgldevKey); } }
void KeyboardCB(OGLDEV_KEY OgldevKey) { switch (OgldevKey) { case OGLDEV_KEY_ESCAPE: case OGLDEV_KEY_q: GLUTBackendLeaveMainLoop(); break; default: m_pGameCamera->OnKeyboard(OgldevKey); } }
void OgldevBackendLeaveMainLoop() { switch (sBackendType) { case OGLDEV_BACKEND_TYPE_GLUT: GLUTBackendLeaveMainLoop(); break; case OGLDEV_BACKEND_TYPE_GLFW: GLFWBackendLeaveMainLoop(); break; default: assert(0); } }
virtual void KeyboardCB(OGLDEV_KEY OgldevKey) { switch (OgldevKey) { case OGLDEV_KEY_ESCAPE: case OGLDEV_KEY_q: GLUTBackendLeaveMainLoop(); break; case OGLDEV_KEY_a: m_directionalLight.AmbientIntensity += 0.05f; break; case OGLDEV_KEY_s: m_directionalLight.AmbientIntensity -= 0.05f; break; } }
void KeyboardCB(OGLDEV_KEY OgldevKey, OGLDEV_KEY_STATE State) { switch (OgldevKey) { case OGLDEV_KEY_ESCAPE: case OGLDEV_KEY_q: GLUTBackendLeaveMainLoop(); break; case OGLDEV_KEY_a: m_directionalLight.AmbientIntensity += 0.05f; break; case OGLDEV_KEY_s: m_directionalLight.AmbientIntensity -= 0.05f; break; case OGLDEV_KEY_z: m_directionalLight.DiffuseIntensity += 0.05f; break; case OGLDEV_KEY_x: m_directionalLight.DiffuseIntensity -= 0.05f; break; default: m_pGameCamera->OnKeyboard(OgldevKey); } }
void KeyboardCB(HAN_KEY HANKey) { switch (HANKey) { case HAN_KEY_ESCAPE: case HAN_KEY_q: GLUTBackendLeaveMainLoop(); break; case HAN_KEY_a: m_directionalLight.AmbientIntensity += 0.05f; break; case HAN_KEY_s: m_directionalLight.AmbientIntensity -= 0.05f; break; case HAN_KEY_z: m_directionalLight.DiffuseIntensity += 0.05f; break; case HAN_KEY_x: m_directionalLight.DiffuseIntensity -= 0.05f; break; default: m_pGameCamera->OnKeyboard(HANKey); } }