Implementing the callback function using mouse and keyboard


Assignment 1 -

Must be done using OpenGL, GLEW and GLFW

Implementing the Callback Function using Mouse and Keyboard

Download the program RotateCube.cpp, fshder36.glsl, vshader36.glsl and InitShader.cpp that will Render a rotating 3D cube in OpenGL.

Compile and Run it.

Add the following callback functions into the code

  • Press the key 's' to stop the rotation.
  • Press the key 'x' to start rotate in the x axis.
  • Press the key 'y' to start rotate in the y axis.
  • Press the key 'z' to start rotate in the z axis.

Assignment 2 -

The goals of this assignment are to familiarize yourself with the OpenGL command of the rendering pipeline.

1. On top of Assignment 2b Part B, define a virtual camera in a 3D virtual scene, specifying its position, orientation and field of view.

2. Interactively perform the following tasks:

  • Change the field of view and aspect ratio of the camera.
  • Change the values of the near and far clipping plane.

3. Using your graphical user interface (GUI) such as GLFW or equivalent, together with the mouse and keyboard, interactively perform the following tasks:

  • Translate the model / camera in X, Y and Z directions.
  • Rotate the model / camera around X, Y, and Z axes.
  • Rotate the model /camera according to the moving direction and distance of the mouse.
  • Zoom in and zoom out view of the model.

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Implementing the callback function using mouse and keyboard
Reference No:- TGS02703296

Expected delivery within 24 Hours