HomeModulesModule 4 (Graphics/OpenGL)Extend
I ntroduce
C onnect
A pply
R eflect
E xtend

Extend - Graphics/OpenGL

The visualization client for your final project will be implemented using OpenInventor, which will be discussed in the next module, and LabView, which will be used as a graphical front-end to your visualization client.

To get a head start on this, consider choosing one of the box codes and rewrite a portion to be manipulated with LabView. For example, you could rewrite box3 to utilize a LabView slider widget to control the spin rate. You will need to use several global variables, particularly the socket descriptor so that you can access them from each of the functions. Typically you will only need to modify two functions, the main loop and the function which controls the desired aspect of the box. With regard to the box3 spin rate example, after adding the pertinent global variables, you would need to modify the main loop to create the socket, and the spinDisplay function to read a spin value from LabView.

After completing the modifications to the box code, you'll need to design the corresponding LabView client. Make sure that your read and write functions correlate between the two codes -- when LabView writes, the box should read, and vice versa. Additionally, verify that the datatypes correspond between LabView and the modified box code.

Once you have finished both the LabView client and the box server, try using the LabView client to manipulate your chosen aspect of the box. While this exercise may seem trivial, it is analogous to that of your final project. And while your final project will utilize multiple clients, the methodology is the same.

For further reading on OpenGL, consult the Wikipedia OpenGL entry. If you're interested in learning more about programming with OpenGL, the Red Book is a good place to start. If you'd like to view a few OpenGL demos, check out the Scene Awards.

Click here to move on to the next Module (GView/IView/Inventor).