hey ya,
gone to have a look at integrating this code into some of my code with modifications, only bit that seems to trouble me is
Local NextX1:Float=100*Cos(Angle)
Local NextY1:Float=100*Sin(Angle)
Local NextX2:Float=100*Cos(Angle)
Local NextY2:Float=100*Sin(Angle)
glTexCoord2f(bottomrightx,bottomrighty)
glVertex2f(NextX1,NextX2)
glTexCoord2f(toprightx,toprighty)
glVertex2f(NextX2,NextY2)
surely nextx1,nexty1 should not be the same as nextx2,nexty2 as in above code?
here is sample code i have put together:
but as u see from runing the code its quiet a strange shape it creates
gone to have a look at integrating this code into some of my code with modifications, only bit that seems to trouble me is
Local NextX1:Float=100*Cos(Angle)
Local NextY1:Float=100*Sin(Angle)
Local NextX2:Float=100*Cos(Angle)
Local NextY2:Float=100*Sin(Angle)
glTexCoord2f(bottomrightx,bottomrighty)
glVertex2f(NextX1,NextX2)
glTexCoord2f(toprightx,toprighty)
glVertex2f(NextX2,NextY2)
surely nextx1,nexty1 should not be the same as nextx2,nexty2 as in above code?
here is sample code i have put together:
SuperStrict SetGraphicsDriver GLGraphicsDriver() GLGraphics 640,480 glViewport(0,0,640,480); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0,640.0/480,0.1,100.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); Global Angle:Float=0 Global Quads:Int=16 Global AngleStep:Float=360.0/Quads Repeat angle=0; glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) glLoadIdentity() glTranslatef(0,0.0,-6.0); glBegin(GL_QUAD_STRIP); glColor3f(0.0,0.0,1.0); glVertex2f(0,0) glVertex2f(0,1) For Local x:Int=0 To 15 Angle:+AngleStep Local NextX1:Float=2*Cos(Angle) Local NextY1:Float=2*Sin(Angle) Local NextX2:Float=2*Cos(Angle) Local NextY2:Float=2*Sin(Angle) 'DebugStop() glVertex2f(nextx1,nexty1); glVertex2f(nexty2,nexty2); Next glEnd(); Flip() Until KeyDown(key_escape)
but as u see from runing the code its quiet a strange shape it creates