Description: This procedure is based on the popular online nehe OpenGL tutorial lesson seventh examples are enhanced.
Maintain a source of light (by the L key control ), texture and angle of rotation changes ( the direction key and the upper and lower renovation ), and posted a six chart, respectively, said six surfaces of the dice.
Increased by the Enter key control dice begins to rotate, the blank space key control the rotating end. The main algorithm is to use rand ( ) function, on the 6 to take over, get 0- 5 of the random number,
Using the switch statement, dice and any surface of rotation to the viewport, so as to realize the function of dice
To Search:
File list (Check if you may need any files):
Touzi\BASETSD.H
.....\Data\1.bmp
.....\....\2.bmp
.....\....\3.bmp
.....\....\4.bmp
.....\....\5.bmp
.....\....\6.bmp
.....\....\Thumbs.db
.....\....老\1.bmp
.....\......\2.bmp
.....\......\3.bmp
.....\......\4.bmp
.....\......\5.bmp
.....\......\6.bmp
.....\......\Thumbs.db
.....\.ebug\Touzi.exe
.....\.....\Touzi.ilk
.....\.....\Touzi.obj
.....\.....\Touzi.pch
.....\.....\Touzi.pdb
.....\.....\vc60.idb
.....\.....\vc60.pdb
.....\GL\GL.H
.....\..\GLAUX.H
.....\..\GLU.H
.....\..\MSCREATE.DIR
.....\Touzi.cpp
.....\Touzi.dsp
.....\Touzi.dsw
.....\Touzi.ncb
.....\Touzi.opt
.....\Touzi.plg
.....\说明.txt
.....\Data
.....\Data老
.....\Debug
.....\GL
Touzi