SAVEBMP of screen whilst minimized?

Previous topic - Next topic

matchy

Normally, it's fine even unfocused but how can I capture the screen when the server program is running minimized or perhaps even as a console?




spacefractal

Glbasic is not a screen grabber, designed with it as I'm know.

Savebmp just grab the game backbuffer.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

matchy

I'm sorry I don't mean the OS desktop grab, I mean program game screen, i.e. the backbuffer:-[

SAVEBMP works with the window normalized or fullscreen with the game backbuffer but not when the window is minimized so that I can run the program as a server that's not in the way.  :(


dreamerman

You can always code some workaround, let say sprite to bmp function. Render backbuffer on sprite, use Sprite2Mem, then just loop through pixels and store them in plain file, add BMP format headers and done.
Normal 24bit bmp without RLE compression is pretty simple to create.
Check my source code editor for GLBasic - link Update: 20.04.2020

spacefractal

There is no graphics drawn when minimized.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

matchy

Why aren't graphics be drawn when minimized? Not fair.  :'(

dreamerman has the idea and it's what I was thinking but not sure how with an existing 3d scene.  8)

The current solution for my image creation server is to place it on another OS virtual desktop, out of the way (haven't tried yet).  ::)

spacefractal

its clearly seen the graphics card dosent draw when not required, then its impossible to do that.

Its also a issue when im tried to save a screenshots from a bigger resolution as the game its self in windowered mode. That is also not possible (etc to create iPad snaps its).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

dreamerman

lol. I forgot that there is SAVESPRITE function... :> with 'autopause false', it will save your offscreen sprite even when app is minimized.
Code (glbasic) Select
USESCREEN
//draw you stuff
SAVESPRITE

Spacefractal  generally yes, gpu doesn't draw when not needed but using USESCREEN you force it to render on sprite, you can of course do real size screenshots for iPad (on deskop pc), all depends how your gui stuff works, it's same as above, render game in iPad resolution to offscreen sprite, save it, rescale it down to pc resolution and draw on backbuffer to be able to play and gather screens from other game parts.
Check my source code editor for GLBasic - link Update: 20.04.2020

matchy

Okay, for now I'll use SAVESPRITE as it *does* work for a minimized server unlike SAVEBMP.  :good:

spacefractal

Im generally not use virtual screen due two issues:
- frame rate is by half.
- alpha multiply issue.

The last issue can still prevent me to use virtual screen on Windows for screenshot, but good idea and a good alternative.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/