I have this function
bool Camera::onKeyboard( int Key )
{
bool Ret = false;
switch (Key)
{
case GLFW_KEY_UP:
{
m_pos += (m_target * STEP_SCALE );
Ret = true;
} break;
case GLFW_KEY_DOWN:
{
m_pos -= (m_target * STEP_SCALE );
Ret = true;
} break;
case GLFW_KEY_LEFT:
{
glm::vec3 left = glm::cross(m_target, m_up );
glm::normalize(left);
left *= STEP_SCALE;
m_pos += left;
Ret = true;
} break;
case GLFW_KEY_RIGHT:
{
glm::vec3 right = glm::cross(m_up, m_target);
glm::normalize(right);
right *= STEP_SCALE;
m_pos += right;
Ret = true;
} break;
}
return Ret;
}
Adn when i try to make function and run it
void GLFWCALL Camera::keyWrapper(int Key)
{
onKeyboard(Key);
}
glfwSetKeyCallback(pGameCamera->keyWrapper);
it doesn't work. Can someone help me how to do it correct?