第十七章在Inventor中使用OpenGL
本章目标
在阅读完本章节后,我们将有能力做下列事情:
l 创建Inventor回调节点,在回调函数中调用OpenGL库函数。
l 了解Inventor是如何使用和影响OpenGL的状态变量
l 编写一个同时使用Inventor与OpenGL的程序,并在程序中使用SoGLRenderAction来渲染场景。
l 使用颜色索引模式(color index mode)。
(高级内容)
本章将讨论如何在同一个窗口中同时调用Inventor和OpenGL库。本章包括几个以不同方式同时使用Inventor与OpenGL的例子程序。从表17-1到表17-9展示了Inventor与OpenGL状态是如何相互影响的。本章的所有内容都是比较高级的内容。
简介
本章只适合于有OpenGL编程经验的开发人员阅读,所以不会刻意地去介绍OpenGL。在阅读本章内容之前,我们应该至少要先阅读1至5章和第9章的内容。在开始将OpenGL与Inventor同时使用前,我们需要对Inventor数据库(第1至4章)、Inventor 动作(第9章)、和Inventor事件处理(第10章)有一个基本的了解。
本章的完整翻译请到下面的地址中下载:
The Inventor Mentor 英文原版。下载
The Inventor Mentor 中文译本。下载
The Inventor Mentor 例子代码。下载