一种虚拟现实应用程序跨平台方法的研究
2016-05-03王灿运刘逢时
王灿运 刘逢时


摘 要: 为了解决虚拟现实应用程序GUI(图形用户界面)跨平台问题,该文提供了一种多线程整合方法,实现了将OpenGL、Vega及OpenGL Performer渲染的三维虚拟场景嵌入到跨平台图形用户界面软件FLTK中,为其他虚拟现实程序应用FLTK跨平台渲染提供参考。基于已有图形工作站硬件结构,该文给出了三维虚拟场景立体显示的工作原理及设计流程。同时,应用几个典型事例证明了该方法的有效性和实用性。
关键字:虚拟现实;跨平台GUI;立体显示;FLTK
中文分类号:TP391.9 文献标识码 A 文章编号:2095-2163(2016)02-
A Cross-platform integration method for Virtual Reality applications
WANG Canyun1 LIU Fengshi2
(1 Department of Electrical and Automation, Shandong Labor Vocational and Technical College, Jinan 250022, China;
2 School of Mechanical Engineering, Shandong University, Jinan 250061, China)
Abstract: To solve cross-platform problem of GUI(Graphical User Interface) in virtual reality applications,this paper presented a multi-thread integration method which can embed 3D scene rendered in OpenGL,Vega and OpenGL Performer into a cross-platform GUI named FLTK.The presented method provides a source of reference for other cross-platform virtual reality rendering engines to be integrated with FLTK.Based on hardware configuration of an existing graphic workstation,the principles and design flow of stereo display are also given.Several experiments are conducted to prove the presented method is effective.
Keyword: Virtual Rreality; cross-platform GUI; stereo display; FLTK
0引 言
随着计算机技术的发展,虚拟现实技术已经被广泛地应用在各种领域。在不同的计算机操作系统中,采用各种场景渲染软件开发了很多虚拟现实应用程序,因此,虚拟现实应用程序的跨平台运行是其非常重要的特征之一[1-2],即在某操作系统下所开发的应用程序,通过稍加修改或不予修改就可以在另外一种操作系统中实现运行。目前,很多商业或免费的虚拟现实程序开发软件已经具备一定的跨平台能力,所以GUI(图形用户界面)跨平台性就成为整体跨平台的关键所在;很多GUI开发工具包跨平台运行能力相对较弱;例如,在windows系统下用MFC开发的程序就不能在Onyx300图形工作站Irix系统下直接运行。
FLTK(Fast Light Tool Kit)是一种基于C++语言的GUI跨平台软件工具包,能够应用于UNIX○R、Microsoft○R Windows○R及MacOS○R X系统中。FLTK提供了非常简洁的GUI功能,并通过OpenGL○R及其GLUT组件支持3D图形的渲染[3];与其他GUI工具MFC及TQ相比,FLTK具备更加简洁、快速及良好的跨平台应用的优点。……
