Autor: Markus Barkholz (---.hsi16.unitymediagroup.de)
Datum: 02.08.21 21:17
Ich habe mein kleines Prog mal umgeschrieben. Verhält sich aber nicht so wie ich es mir wünsche. Mein Bildkreisel wird im ganzen größer. Ich möchte aber nur das vorderste Quad auf Vollbild zoomen lassen und natürlich zurück.
Was mache ich da falsch?
Seht selbst:
Declare fps%, tmr&, frm%, rT!, xFps&, yFps&, x&, y&, count&
Var dist! = 0.21
Count& = -30
CLS
oGL("Init", %hWnd, 0, 0, 0, 0)
Set("TrueColor", 1)
Set("oGLDepth", 512)
xFps& = create("Font", "Curier", 12, 0, 0, 0, 0)
yFps& = oGL("OutlineFont", xFps&, 0.0)
DeleteObject xFps&, yFps&
SetTimer 20
While 1
If &GetTickCount - tmr& >= 1000
fps% = frm%
tmr& = &GetTickCount
frm% = 0
EndIf
rT! = rT! + 0.001 : If rT! >=6.28: rT! = 0.0 : EndIf
oGL("Clear")
oGL("PosMode", 1)
oGL("Origin", 50, 40, -100)
oGL("Print", yFps&, str$(y&))
For x&,0,29
oGL("push")
oGL("Fog", 2, 0.04, 0)
oGL("BlendMode",2)
oGL("Texture", "", 1)
oGL("Origin", 0, 0, count&)
oGL("Move", 10.1*sin(rT!+(x&*dist!)+0.194), 0, 17*cos(rT!+(x&*dist!)+0.194))
oGL("Quad", 1.6, 1)
oGL("pop")
EndFor
For x&,0,29
oGL("push")
oGL("Fog", 2, 0.04, 0)
oGL("BlendMode",2)
oGL("Texture", "", 1)
oGL("Origin", 0, 0, -30)
oGL("Move", 0, 9.1*sin(rT!+(x&*dist!)+0.194), 17*cos(rT!+(x&*dist!)+0.194))
oGL("Quad", 1, 1.6)
oGL("pop")
EndFor
If (rT!*1000) MOD (dist!*1000) = 0.0
'inc y& : if y& = 29 : y& = 0 : EndIf
sleep 500 'Hier kommt die Ladeprozedur hin!!! Sleep ist nur ein Ersatz!!!
count& = count& + 0.11
EndIf
oGL("Show")
If IsKey(27)
End
EndIf
EndWhile
KillTimer
End
|
|