Quad
include "sw.inc"
include "swgl.inc"
hwnd = Window 640,480,1
hdc = InitGl(hwnd)
single x
texture1 = Loadimage "img/angel.bmp"
texture2 = LoadImage "img/image4.bmp"
glClearColor 0.5, 0.5, 0.5, 1.0
while Key(27)=0
glClear GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
glLoadIdentity
glRotatef x,1.0,1.0,-1.0
glBindTexture GL_Texture_2D, texture2
glBegin(GL_QUADS)
glTexCoord2f(0.0, 0.0): glVertex3f(-0.5, -0.5, 0.5)
glTexCoord2f(1.0, 0.0): glVertex3f( 0.5, -0.5, 0.5)
glTexCoord2f(1.0, 1.0): glVertex3f( 0.5, 0.5, 0.5)
glTexCoord2f(0.0, 1.0): glVertex3f(-0.5, 0.5, 0.5)
glTexCoord2f(1.0, 0.0): glVertex3f(-0.5, -0.5, -0.5)
glTexCoord2f(1.0, 1.0): glVertex3f(-0.5, 0.5, -0.5)
glTexCoord2f(0.0, 1.0): glVertex3f( 0.5, 0.5, -0.5)
glTexCoord2f(0.0, 0.0): glVertex3f( 0.5, -0.5, -0.5)
glTexCoord2f(0.0, 1.0): glVertex3f(-0.5, 0.5, -0.5)
glTexCoord2f(0.0, 0.0): glVertex3f(-0.5, 0.5, 0.5)
glTexCoord2f(1.0, 0.0): glVertex3f( 0.5, 0.5, 0.5)
glTexCoord2f(1.0, 1.0): glVertex3f( 0.5, 0.5, -0.5)
glTexCoord2f(1.0, 1.0): glVertex3f(-0.5, -0.5, -0.5)
glTexCoord2f(0.0, 1.0): glVertex3f( 0.5, -0.5, -0.5)
glTexCoord2f(0.0, 0.0): glVertex3f( 0.5, -0.5, 0.5)
glTexCoord2f(1.0, 0.0): glVertex3f(-0.5, -0.5, 0.5)
glTexCoord2f(1.0, 0.0): glVertex3f( 0.5, -0.5, -0.5)
glTexCoord2f(1.0, 1.0): glVertex3f( 0.5, 0.5, -0.5)
glTexCoord2f(0.0, 1.0): glVertex3f( 0.5, 0.5, 0.5)
glTexCoord2f(0.0, 0.0): glVertex3f( 0.5, -0.5, 0.5)
glTexCoord2f(0.0, 0.0): glVertex3f(-0.5, -0.5, -0.5)
glTexCoord2f(1.0, 0.0): glVertex3f(-0.5, -0.5, 0.5)
glTexCoord2f(1.0, 1.0): glVertex3f(-0.5, 0.5, 0.5)
glTexCoord2f(0.0, 1.0): glVertex3f(-0.5, 0.5, -0.5)
glEnd()
DoEvents
SwapBuffers hdc
SetFps (60)
x += 1.0
iF x >360 Then x =-x
wend
QuitGL
CloseWindow