evolon696
evolon696

Reputation: 267

Capturing screen with SDL?

how would i go about capturing my computer's screen with SDL? is this possible with SDL? i wanted to try something like applying a surface to the main renderer (if that makes any sense either) and then call:

SDL_SaveBMP(back_buffer, "screen.png");

how would i do what i want to do if it is possible? has anyone done this before?

Upvotes: 0

Views: 1652

Answers (2)

Mihai
Mihai

Reputation: 343

I hope this helps: Try to create a new surface by combining all the surfaces you want to render into one( by using getpixel() and putpixel() functions -you man need to make them yourself- ), then SDL_SaveBMP( newsurface,"name.bmp") ( I personally don't know if SaveBMP can save .png files )

Upvotes: 0

user142162
user142162

Reputation:

This cannot be done. What you are describing is a platform dependent operation which is not implemented by SDL.

Upvotes: 2

Related Questions