FinalProject/Myst/myst.cpp
//Method which is used to bind the F1 to toggle between windowed mode and (fake) fullscreen
Method which is used to bind the F1 to toggle between windowed mode and (fake) fullscreen
Method which is used to bind the F1 to toggle between windowed mode and ( fake ) fullscreen
void BindKeyPressEvents(GLFWwindow* window, int key, int scancode, int action, int mods)
{
    if (key == KEY_TOGGLE_FULLSCREEN && action == GLFW_PRESS)
    {
        isFullscreen = !isFullscreen;
        SetResolution();
        cout << "INFO   Resolution: " << (isFullscreen ? "Fullscreen @ " : "Windowed @ ") << WINDOW_WIDTH << "x" << WINDOW_HEIGHT << endl;
    }
    else if (key == KEY_TOGGLE_NOCLIPMODE && action == GLFW_PRESS)
    {
        camera.IsNoClipMode = !camera.IsNoClipMode;
        camera.CheckBounds();
        cout << "INFO   No Clip Mode: " << (!camera.IsNoClipMode ? "On" : "Off") << endl;
    }
    else if (key == KEY_TOGGLE_PROJECTION && action == GLFW_PRESS)
    {
        isFirstPersonView = !isFirstPersonView;
        cout << "INFO   View Mode: " << (!isFirstPersonView ? "Perspective" : "Orthographic") << endl;
    }
    else if (key == KEY_TOGGLE_FLASHLIGHT && action == GLFW_PRESS)
    {
        isFlashlightOn = !isFlashlightOn;
        cout << "INFO   Flashlight: " << (isFlashlightOn ? "On" : "Off") << endl;
    }
}
void BindKeyPressEvents ( GLFWwindow * window , int key , int scancode , int action , int mods ) { if ( key == KEY_TOGGLE_FULLSCREEN && action == GLFW_PRESS ) { isFullscreen = ! isFullscreen ; SetResolution ( ) ; cout << " " << ( isFullscreen ? " " : " " ) << WINDOW_WIDTH << " " << WINDOW_HEIGHT << endl ; } else if ( key == KEY_TOGGLE_NOCLIPMODE && action == GLFW_PRESS ) { camera . IsNoClipMode = ! camera . IsNoClipMode ; camera . CheckBounds ( ) ; cout << " " << ( ! camera . IsNoClipMode ? " " : " " ) << endl ; } else if ( key == KEY_TOGGLE_PROJECTION && action == GLFW_PRESS ) { isFirstPersonView = ! isFirstPersonView ; cout << " " << ( ! isFirstPersonView ? " " : " " ) << endl ; } else if ( key == KEY_TOGGLE_FLASHLIGHT && action == GLFW_PRESS ) { isFlashlightOn = ! isFlashlightOn ; cout << " " << ( isFlashlightOn ? " " : " " ) << endl ; } }
Method which is used to bind the F1 to toggle between windowed mode and (fake) fullscreen
Method which is used to bind the F1 to toggle between windowed mode and ( fake ) fullscreen