Sign in to follow this  
ajm113

OpenGL Hide model and change camera position?

Recommended Posts

Hi OpenGL fans and know it alls. I have a question on the camera, model hiding. 1. I want to allow the user to zoom in the area with the current camera position that it is at with the scoll pad on the mouse how can I do that? 2.I want to allow the user to view side to top by pressing "1" on the keyboard and hide the Sky Box that shows on the side. How can I do this? I do have code on starting this.

void handleSpecialKeyReleased(int key, int x, int y) {
	switch(key) {
		//...
		case GLUT_KEY_1:
	     bool firstView = true;
              bool HideSky = false;
              
            if(firstView == true)
             {
             HideSky = true;
              firstView = false;           
              }
              else if(firstView == false)
                                {
                                HideSky = false;
                                 firstView = true;   
            }    
			break;
	}
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this