peter
02-12-2013, 17:38
Hello,
I need to know, how runs it with you!
Got you a GPF ? Please report here.
#INCLUDE "a.inc"
#INCLUDE "swgl.inc"
Long hwnd
hwnd = OpenWindow 640,480,1
InitGl hwnd
Single r, v
Long i
Dim coins(6) As Long
For i=1 To 6
coins(i) = LoadImage "coins/coin" & i & ".bmp"
Next
i=1
glClearColor 0.0, 0.0, 0.96, 1.0
While KeyDown(27)=0
glClear %oGL_COLOR_BUFFER_BIT Or %oGL_DEPTH_BUFFER_BIT
glLoadIdentity
glBindTexture %oGL_TEXTURE_2D, coins(i)
glTranslatef(0.0, 0.0, 0.0)
glRotatef r, 1.0 , 1.0 , 1.0
glScalef 2.0, 2.0, 2.0
glBegin %oGL_QUADS
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2, 0.2, -0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2, 0.2, -0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2, 0.2, 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2, 0.2, 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2,- 0.2, 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2,- 0.2, 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2,- 0.2, -0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2,- 0.2, -0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2,- 0.2,- 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2,- 0.2,- 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2, 0.2,- 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2, 0.2,- 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f (- 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2, 0.2, -0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2,- 0.2, -0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f (- 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2, 0.2,- 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f ( 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f ( 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2,- 0.2,- 0.2 )
glEnd
r += 1.0
v += 0.2
If v >=1.0 Then
v = 0.0
i +=1
If i=7 Then i=1
End If
Events
SwapBuffer
SetFps 60
Wend
QuitGL
CloseWindow
I need to know, how runs it with you!
Got you a GPF ? Please report here.
#INCLUDE "a.inc"
#INCLUDE "swgl.inc"
Long hwnd
hwnd = OpenWindow 640,480,1
InitGl hwnd
Single r, v
Long i
Dim coins(6) As Long
For i=1 To 6
coins(i) = LoadImage "coins/coin" & i & ".bmp"
Next
i=1
glClearColor 0.0, 0.0, 0.96, 1.0
While KeyDown(27)=0
glClear %oGL_COLOR_BUFFER_BIT Or %oGL_DEPTH_BUFFER_BIT
glLoadIdentity
glBindTexture %oGL_TEXTURE_2D, coins(i)
glTranslatef(0.0, 0.0, 0.0)
glRotatef r, 1.0 , 1.0 , 1.0
glScalef 2.0, 2.0, 2.0
glBegin %oGL_QUADS
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2, 0.2, -0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2, 0.2, -0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2, 0.2, 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2, 0.2, 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2,- 0.2, 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2,- 0.2, 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2,- 0.2, -0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2,- 0.2, -0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2,- 0.2,- 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2,- 0.2,- 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2, 0.2,- 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2, 0.2,- 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f (- 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f (- 0.2, 0.2, -0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f (- 0.2,- 0.2, -0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f (- 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 1.0: glVertex3f ( 0.2, 0.2,- 0.2 )
glTexCoord2f 0.0, 1.0: glVertex3f ( 0.2, 0.2, 0.2 )
glTexCoord2f 0.0, 0.0: glVertex3f ( 0.2,- 0.2, 0.2 )
glTexCoord2f 1.0, 0.0: glVertex3f ( 0.2,- 0.2,- 0.2 )
glEnd
r += 1.0
v += 0.2
If v >=1.0 Then
v = 0.0
i +=1
If i=7 Then i=1
End If
Events
SwapBuffer
SetFps 60
Wend
QuitGL
CloseWindow