Post by Supermonkey on Aug 1, 2003 21:23:23 GMT -5
I know its crap but im a n00b and some of the commands I dont know what they do but I know they have to be there
like what does 'glloadidentity()' do?
Thanks anyway,
Jonny
textmode(TEXT_OVERLAID)
dim az#,ax#,ay#,i,zoom#
zoom#=-8
while true
locate 0,0:print "Use the Q+W Keys to rotate along the"
locate 0,1:print "X-AXIS"
locate 0,2:print "Use the A+S Keys to rotate along the"
locate 0,3:print "Y-AXIS"
locate 0,4:print "Use the Z+X Keys to rotate along the"
locate 0,5:print "Z-AXIS"
locate 0,6:print "Use the I+O KEYS TO ZOOM"
glclear(GL_DEPTH_BUFFER_BIT OR GL_COLOR_BUFFER_BIT)
glloadidentity()
gltranslatef(0,0,zoom#)
glrotatef(az#,1,0,0)
glrotatef(ax#,0,0,1)
glrotatef(ay#,0,1,0)
glbegin(GL_QUADS)
' Top
glBegin (GL_QUADS)
glcolor3f(1,0,1): glVertex3f (-2.05,2, -2.05)
glcolor3f(1,1,0): glVertex3f (2.05,2, -2.05)
glcolor3f(0,1,1): glVertex3f (2.05,2, 2.05)
glcolor3f(0,1,0): glVertex3f (-2.05,2, 2.05)
glEnd ()
' Sides
for i = 1 to 4
glBegin (GL_QUADS)
glcolor3f(1,0,1):glVertex3f (-2.05, 2.05, -2)
glcolor3f(1,1,0):glVertex3f (2.05, 2.05, -2)
glcolor3f(0,1,1):glVertex3f (2.05,-0.05, -2)
glcolor3f(1,0,0):glVertex3f (-2.05,-0.05, -2)
glEnd ()
glRotatef (90, 0, 1, 0)
next
'Bottom
glBegin (GL_QUADS)
glcolor3f(1,0,1): glVertex3f (-2.05, 0, -2.05)
glcolor3f(1,1,0): glVertex3f (2.05, 0, -2.05)
glcolor3f(0,1,1): glVertex3f (2.05, 0, 2.05)
glcolor3f(0,1,0): glVertex3f (-2.05, 0, 2.05)
glEnd ()
if keydown("Q") then ax#=ax#-1:endif
if keydown("W") then ax#=ax#+1:endif
if keydown("A") then ay#=ay#-1:endif
if keydown("S") then ay#=ay#+1:endif
if keydown("Z") then az#=az#-1:endif
if keydown("X") then az#=az#+1:endif
if keydown("I") then zoom#=zoom#+0.1:ENDIF
if keydown("O") then zoom#=zoom#-0.1:endif
drawtext()
swapbuffers()
wend
like what does 'glloadidentity()' do?
Thanks anyway,
Jonny