Does this article help? ->GL 3D transformationsUhm. I get your basic idea, but i can't implement it. You mean, rotate it and then pull back to 0,0,0 position or wut?
Sub glsv_Draw(gl As GL1)
gl.glClearColor(0.1,0.35,0.6,1)
gl.glClear(Bit.Or(gl.GL_COLOR_BUFFER_BIT, gl.GL_DEPTH_BUFFER_BIT))
' cube - textured
gl.glLoadIdentity : gl.glScalef(0.5,0.5,0.5)
gl.glTranslatef(0.0,-1.2,distZ)
gl.glRotatef(rotX,0.0,0,0.0)
gl.glRotatef(rotY,0,1,0.0)
'gl.glRotatef(rotY,0,1,distZ)
GLObject_Draw(obj1,gl)
GLObject_Draw(obj2,gl)
GLObject_Draw(skyboxx,gl)
DrawTrees(gl)
DrawObjects(gl)
End Sub
gl.glLoadIdentity : gl.glScalef(0.5,0.5,0.5)
gl.glTranslatef(0.0,-1.2,distZ)
gl.glRotatef(rotX,0.0,0,0.0)
gl.glRotatef(rotY,0,1,0.0)
Does it support animated .x files?
Sub glsv_Draw(gl As GL1)
......
' reset the scene
gl.glLoadIdentity
' ===================
' CAMERA
' ===================
' set camera to 'look' at certain position
' EYE 0,6,9 CENTER 0,0,0 VECTOR 0,1,0
gl.gluLookAt(0,6,9 , 0,0,0 , 0,1,0)
' perform rotation in Y axis
gl.glRotatef(rotY,0,1,0)
' ===================
' draw first object
' ===================
gl.glPushMatrix
gl.glTranslatef(1.1,0,distZ)
gl.glColor4f(0.6,1,0.6 , 1) ' green barrel colour
GLObject_Draw(obj1,gl)
gl.glPopMatrix
' ===================
' draw second object
' ===================
gl.glPushMatrix
gl.glColor4f(1,0.2,0.2 , 1) ' red barrel colour
gl.glTranslatef(-1.1,0,distZ)
GLObject_Draw(obj2,gl)
gl.glPopMatrix
End Sub
> --- Slide finger horizontally to rotate around objects
' "Move via sliding in all directions"
If tog_MoveMethod.Checked=False Then
gl.glTranslatef(mX,yHeight,mY)
Else
' "Move via rotate Y and slide Z"
gl.glRotatef(-mX,0,1,0) <--- Swap these **
gl.glTranslatef(0,yHeight,mY) <--- Swap these **
End If
Your link is broken