Page 3 of 3

Re: [5.22 LTS] WindowEvent() destroys graphics

Posted: Sun May 18, 2014 4:11 pm
by Fred
Your code is still wrong, is it so hard to understand than you have to process all the events at EVERY frame ?!

Re: [5.22 LTS] WindowEvent() destroys graphics

Posted: Sun May 18, 2014 4:31 pm
by heartbone
Fred wrote:Your code is still wrong, is it so hard to understand than you have to process all the events at EVERY frame ?!
No it is not hard at all to understand once the windowed programming environment is properly documented.
Some of vital and necessary information about the environment was not available to me until this thread.

Can I assume that you are referring to the code loop here?

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_CloseWindow
Updated to.

Code: 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)
ForEver
I hope that passes the test.

Re: [5.22 LTS] WindowEvent() destroys graphics

Posted: Sun May 18, 2014 5:35 pm
by BasicallyPure
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?
Yes it works as expected. :)

Re: [5.22 LTS] WindowEvent() destroys graphics

Posted: Sun May 18, 2014 5:41 pm
by heartbone
Merci, mon ami.
The more information we share, the better it will be for me.

Then the full screen problem is either with U13.10 or in my computer.
I wish I had another U13.10 box to compile on.