| |
|
|
Walter Köhler | this is already something heftiger. Problematik: i want by oGL one Objekt on-screen moving, schrittweise. in the Wartephase but should already The next Berechnung made go. with Sleep can I of course The Wartephase einleiten without the the processor therefore charged becomes (settimer), but the Berechnung becomes nevertheless first to term of Sleep implemented, and this is Kacke .
who knows The Solution ( would already class)
WKS |
|
|
| WKS Win XP Xprofan 10 AMD 1.6GHz 1GB Ram | 06/09/08 ▲ |
|
|
|
|
Jörg Sellmeyer | If you a Timer in your Program einbaust, can You all sorts of things apparently parallel run out let: CompileMarkSeparationdeclare icon1&,button1&,choicebox&,oglwindow&,klick%,ende%,klick2%
Proc baueMenue
CHOICEBOX& = CREATE(CHOICEBOX,%HWND,2,0010,0050,0170,0500)
addstring(choicebox&,box)
addstring(choicebox&,bla)
addstring(choicebox&,blaBla)
BUTTON1& = @Create(BUTTON,%HWND,TEST,0010,0500,0080,0060)
Endproc baueMenue
proc test
whileloop 100
inc Klick2%
drawtext 50,200, Klick2%
drawtext 0,230, gettext$(Choicebox&)
wend
endproc test
Proc Test2
whileloop 10
sleep 1000
Drawtext 0,30, Test2 gewählt
inc Klick%
Drawtext 100,30, Klick%
wend
endproc test2
*** HAUPTPROGRAMM *****
windowtitle Menutest
declare mItem%
CLS 0
showmax
popup &Datei
appendmenu 110,&Neuer Test
popup &Hilfe
appendmenu 210,&Hilfe F11
baueMenue
SetTimer 1
whilenot ende%
waitinput
SetText BUTTON1&,Str$(&getTickcount)
select %menuItem
caseof 110:test2 startet den Teil mit Sleep
otherWise
endSelect
if iskey(34)BildRunter
drawtext 0,0, Bild runter Taste
inc Klick%
drawtext 100,0, Klick%
ELSEIF @Clicked(BUTTON1&) diese Berechnung soll gemacht werden während Proc test2 arbeitet
test
endif
setmenuitem 0
endwhile
KillTimer
usecursor 0
end
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 06/09/08 ▲ |
|
|
|
|
| In Buntank stick The Solution.
slopes by setTimer-Api a Timer into subClassProc one, i'd 30ms dial.
this calls but a game-Frame-Proc on, these against schaut again circa 30ms vergangen are and calls, if vergangen, The eigentliche Zeichnungsproc on.
this machinery promising simple Echtzeitprogrammierung and the game-Frame-Proc can also in all further Loop called go there these Yes self over again on past 30ms respect.
advantages: geringstmögliche Systemlast and plainer Echtzeitnachbau
As I said already (u.A.) vorgemacht in Buntank, try there withal the something others Syntax herauszulesen as goes. |
|
|
| |
|
|
|
Walter Köhler | ok! in your Source Jörg, see I unfortunately no Solution. The both Procs walk eindeutig only nacheinander, never parallel.
will be now time BUNTANK Source Search and then ma see how far me the bring can. cu WKS |
|
|
| WKS Win XP Xprofan 10 AMD 1.6GHz 1GB Ram | 06/09/08 ▲ |
|
|
|
|
| @Walter: parallel there so and so not - not even in real Threads, because this is one typischer Anfängerdenkfehler the we certainly any time unterlagen.
its always only The question the organization the releases so it so works as be something parallel - therefore try simply To understand How z.B. Buntank The releases distributed circa Ähnliches nachzubilden. |
|
|
| |
|
|
|
| here [...] Perhaps too for you interestingly, velvet dahinterstehendem item [...] and the dortigem demonstration fpsinctest.exe [...] and [...] and [...] . |
|
|
| |
|
|