nstream. This issue is based on Visual Studio 2005 platform, 3D game, although some simple procedures, but this is the basis for creating complex 3D games.
This game is mainly composed of four parts: angle control, sky, ground and model loading. First of all, necessary to establish the basis of some system files, such as the various header files included in a collection of files Stdafx, to facilitate other documents call the function library file (such as the OpenGL library, math library files, etc.). On this basis, the establishment of a number, such as font type (group to be used to display numbers), vector type, bitmap loading basic framework of classes and system classes and other systems necessary to run some basic classes. The establishment of a good run these games must have some basic classes, we can create the sky type, terrain type of the. Then these two files with a SkyAndTerrain encapsulate.
Key
words: computer; the 3d games; OpenGL; Visual Studio 2005
1 OpenGL概述
OpenGL作为一个性能优越的图形应用程序设计界面(API)适合于广泛的
计算机环境,从个人计算机、工作站到超级计算机,OpenGL都能实现高性能的三维图形功能。由于许多在计算机界具有领导地位的计算机公司纷纷采用OpenGL作为三维图形应用程序设计界面,OpenGL应用程序具有广泛的移植性。OpenGL已成为目前的三维图形开发标准。
OpenGL(OpenGL Graphics Library,开发性图形库)是目前用于开发可移植的、可交换的2D和3D图形应用程序的首选环境,是行业领域中最为广泛接纳的2D/3D图形API,也是目前应用最为广泛的计算机图形标准,其自诞生至今已催生了各种计算机平台及设备上的数千优秀应用程序。通过对OpenGL的特点、功能、工作流程和绘图流程的
学习,我们将会对OpenGL有一个初步的了解,建立起基本的概念。
1.1 OpenGL的特点及功能
OpenGL作为一个性能优越的图形应用程序设计界面,具有以下几个特点,如图1.1所示
图1.1 OpenGL特点
1.1