1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| Public Sub ShowWin()
Dim b
BuildTree 'creation of displaylists
glClear clrColorBufferBit Or clrDepthBufferBit 'clear the screen
glLoadIdentity
gluLookAt -20, -20, 0, 0, 0, 0, 0, 0, 1
glEnable glcDepthTest
i = 0
Do While i < 1
b = 2 * i 'find the coordinates
gltranslatef -b, b, 0
glcalllist TreeList 'executes displaylist
gltranslatef b, -b, 0
i = i + 1
TreeList = TreeList + 1 'number generated for the next displaylist
Loop
SwapBuffers hDC 'show the scene
End Sub
Private Sub BuildTree()
TreeList = glgenlists(2) 'empty displaylists
glnewlist TreeList, lstCompile 'creation of a display list
glcolor3f 0, 1, 0
glutsolidsphere 2, 10, 10
glendlist
End Sub
Do While Not EOF(1) And i < 2
Line Input #1, NumberRead 'reads the first two lines
If (NumberRead > 160) Then
ShowWin (AlreadyDoneOnce)
End If
i = i + 1
Loop 'DONE 3855 TIMES |
Partager