[5.22 LTS] WindowEvent() destroys graphics

Linux specific forum
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.22 LTS] WindowEvent() destroys graphics

Post by Fred »

Your code is still wrong, is it so hard to understand than you have to process all the events at EVERY frame ?!
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: [5.22 LTS] WindowEvent() destroys graphics

Post 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.
Keep it BASIC.
User avatar
BasicallyPure
Enthusiast
Enthusiast
Posts: 539
Joined: Thu Mar 24, 2011 12:40 am
Location: Iowa, USA

Re: [5.22 LTS] WindowEvent() destroys graphics

Post 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. :)
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: [5.22 LTS] WindowEvent() destroys graphics

Post 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.
Keep it BASIC.
Post Reply