Lou can use some C++ print statement to show the hange in the transValue values. Example:

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question

Computer graphics 

 

+
Exercise 2: Keyboard Events
1 In your code you can see variable called transValue
- Use this variable to interactively change its value using the
keyboard event
1 Use this variable to translate the x component of the green
triangle in the display function
- In the keyboard function, use the letter 't' to increment the
value of transValue by 0.1
1 You can use some C++ print statement to show the
change in the transValue values. Example:
I cout<<"The new translate value is: "<<transValue <<endl;
Exercise 2: Output
OpenGL Lab 4
B CAUsers\ohnagoor\Desktop\My C
translate X:0.1
translate x:0.2
translate x:0.3
+
Transcribed Image Text:+ Exercise 2: Keyboard Events 1 In your code you can see variable called transValue - Use this variable to interactively change its value using the keyboard event 1 Use this variable to translate the x component of the green triangle in the display function - In the keyboard function, use the letter 't' to increment the value of transValue by 0.1 1 You can use some C++ print statement to show the change in the transValue values. Example: I cout<<"The new translate value is: "<<transValue <<endl; Exercise 2: Output OpenGL Lab 4 B CAUsers\ohnagoor\Desktop\My C translate X:0.1 translate x:0.2 translate x:0.3 +
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr