Chapter 1 use OpenGL in inventor
Objectives of this Chapter
After reading this chapter, we will be able to do the following:
L create an inventor callback node and call the OpenGL library function in the callback function.
L understand how inventor uses and affects OpenGL State Variables
L compile a program that uses both inventor and OpenGL, and useSoglrenderactionTo render the scenario.
L use color index mode ).
(Advanced content)
This chapter describes how to call both the inventor and OpenGL libraries in the same window. This chapter includes several examples of using both inventor and OpenGL in different ways. From table 17-1 to table 17-9, it shows how the inventor and OpenGL states affect each other. All content in this chapter is relatively advanced.
Introduction
This chapter is only suitable for developers with OpenGL programming experience, so they will not deliberately introduce OpenGL. Before reading this chapter, we should read at least chapters 1 to 5 and 9th. Before we begin to use OpenGL with inventor, we need to process the inventor database (Chapters 1st to 4), inventor actions (Chapter 9th), and inventor events (Chapter 10th) have a basic understanding.
For the complete translation of this chapter, please download the following link:
The inventor mentorOriginal English version. Download
The inventor mentorChinese translation. Download
The inventor mentorSample Code. Download