Re: [5.22 LTS] WindowEvent() destroys graphics
Posted: Sun May 18, 2014 4:11 pm
Your code is still wrong, is it so hard to understand than you have to process all the events at EVERY frame ?!
http://www.purebasic.com
https://www.purebasic.fr/english/
No it is not hard at all to understand once the windowed programming environment is properly documented.Fred wrote:Your code is still wrong, is it so hard to understand than you have to process all the events at EVERY frame ?!
Code: Select all
Repeat
If DRAWFLAG And DRAWTIME < ElapsedMilliseconds()
DRAWFLAG= 0
StartDrawing(ScreenOutput()) : DrawingFont(FontID(2))
DrawText(150,550,"AFTER 1 SECOND OF WindowEvent() CALLS",RGB(192,192,0))
StopDrawing() : FlipBuffers()
EndIf
Delay(2)
Until WindowEvent()= #PB_Event_CloseWindowCode: Select all
Repeat
CLEARQUEUE()
If DRAWFLAG And DRAWTIME < ElapsedMilliseconds()
DRAWFLAG= 0
StartDrawing(ScreenOutput()) : DrawingFont(FontID(2))
DrawText(150,550,"AFTER 1 SECOND OF WindowEvent() CALLS",RGB(192,192,0))
StopDrawing() : FlipBuffers()
EndIf
Delay(2)
ForEverYes it works as expected.heartbone wrote:Can I assume that the full screen snippet in post #14 also works as expected on your 64 bit PB compiler running in 64 bit U13.10?