0
votes

I'm starting with SDL2 and and having some trouble trying to conver SDL_renderer to SDL_window. How I can convert SDL_rnderer to SDL_window exactly?

2
Why do you think this is something that you would be able to do, and why would you want to do it? - Benjamin Lindley

2 Answers

2
votes

You cannot, they are different structures.

Anyway, you can create a SDL_Renderer for a given SDL_Window by means either of the SDL_CreateRenderer method or the SDL_CreateWindowAndRenderer method.

0
votes

It's not possible. A window is, well, a window. While a renderer is responsible for rendering/generating the image. The "insides" of a window usually consists of a renderer.

In this way, a window uses a renderer which should explain why it's not possible to convert a renderer to a window.