It is currently Tue Mar 09, 2021 8:17 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [PB 5.73 LTS] ScreenOutput doesn't work
PostPosted: Wed Dec 09, 2020 12:05 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 596
Using ScreenOutput results in a white screen, even if you don't draw anything. Tested on Ubuntu 20.04 x64.

Code:
EnableExplicit

Global quit, event

InitSprite()

If OpenWindow(0, 0, 0, 320, 240, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

  If OpenWindowedScreen(WindowID(0), 0, 0, 320, 240)
   
    Repeat
      Repeat
        event = WindowEvent()
       
        Select event
          Case #PB_Event_CloseWindow
            quit = 1
       
        EndSelect
       
      Until event = 0

      ClearScreen(RGB(0, 0, 0))
     
      If StartDrawing(ScreenOutput())
        Box(10, 10, 32, 32, RGB(255, 0, 0))
        StopDrawing()
      EndIf
     
      FlipBuffers()
   
    Until quit

  EndIf
EndIf


Last edited by wombats on Wed Dec 09, 2020 9:15 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: ScreenOutput doesn't work
PostPosted: Wed Dec 09, 2020 2:48 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 1045
Location: Canada
You don't mention any of your specs but it looks like it's your system.
On Linux Mint 19 compiled with PureBsic 5.73 LTS x64 I see this...
Image

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: ScreenOutput doesn't work
PostPosted: Wed Dec 09, 2020 8:35 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 596
I updated my post with my specs. Even so, in your screenshot, the box isn't at the Y coordinate it's supposed to be, unless you modified it.


Top
 Profile  
Reply with quote  
 Post subject: Re: [PB 5.73 LTS] ScreenOutput doesn't work
PostPosted: Wed Dec 09, 2020 12:07 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Dec 17, 2009 12:00 pm
Posts: 215
Location: Llangadog, Wales, UK
On MX Linux 19.3 x64 Xfce the above test code works correctly for gtk2 and gtk3 -

Image

but does not work if using Qt -

Image

On another machine with MX Linux 19.3 KDE Plasma subsystems gtk2 and gtk3 are also good and appear the same as under Xfce, but for Qt the window is all black - no white area and no red box.

Note - MX Linux is closely based on Debian 10.6 stable (Buster). PB 5.73 LTS x64 on both systems.

_________________
www.deeproot.co.uk


Top
 Profile  
Reply with quote  
 Post subject: Re: ScreenOutput doesn't work
PostPosted: Wed Dec 09, 2020 4:11 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 1045
Location: Canada
wombats wrote:
I updated my post with my specs. Even so, in your screenshot, the box isn't at the Y coordinate it's supposed to be, unless you modified it.


Sorry, I had "Interface Scaling" set to "Double (HiDPI)" so the display was incorrect.
I set this option back to normal and the display is what it should be. Picture has been updated.

_________________
Image Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye