summaryrefslogtreecommitdiff
path: root/glflag
diff options
context:
space:
mode:
Diffstat (limited to 'glflag')
-rw-r--r--glflag/test.bmx38
1 files changed, 23 insertions, 15 deletions
diff --git a/glflag/test.bmx b/glflag/test.bmx
index 24aa3ba..7fadef6 100644
--- a/glflag/test.bmx
+++ b/glflag/test.bmx
@@ -27,25 +27,33 @@ glDisable(GL_LIGHTING)
glMatrixMode(GL_MODELVIEW)
-cells=50
-size=1
-
-'f:GLFlag=GLFlag.Create(tid1,cells,cells,size,False,-200)
-f:GLFlag=GLFlag.Create(tid2,cells,cells,size,True,-200)
-
-c=0
+cells=100
+size=10
+
+f1:TGLFlag=TGLFlag.Create(tid1,cells,cells,size,False,-400)
+f2:TGLFlag=TGLFlag.Create(tid2,cells,cells,size,True,-400)
+
+f1.SetMove(300)
+f2.SetMove(300)
+'f.xrot=-60
+
+For x=0 Until cells
+ For y=0 Until cells
+ dx=cells/2-x
+ dy=cells/2-y
+
+ f1.Nudge(x,y,((dx*dx)+(dy*dy))*10,50)
+ f2.Nudge(x,y,((dx*dx)+(dy*dy))*10+1800,50)
+ c:+100
+ Next
+Next
While Not KeyDown(KEY_ESCAPE)
- c:+1
-
- If (c=100)
- f.Nudge(Rand(0,cells-1),Rand(0,cells-1),Rnd(),Rnd(),Rnd())
- c=0
- EndIf
-
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
glLoadIdentity()
- f.Render(0.9,0.95)
+ f1.Render()
+ f2.Render()
+ 'f.yrot:+0.1
bglSwapBuffers
FlushMem
Wend