Create SDL 2 renderer without a window?

Started by
1 comment, last by BitMaster 8 years, 3 months ago

So I've got a primary renderer attached to a window, it works fine. However, I have a texture I want to render to before I use the primary renderer to render the texture to the screen. I understand you can change the target of a renderer, and I've done this successfully. The problem is that I want to have the rendering to my texture be in its own thread, and using the same renderer with two threads simultaneously tends to create issues.

How can I render things to a texture in a separate thread from the main thread safely?

Advertisement

OFF-TOPIC, please remove my reply

I have not done so with SDL but in the past I worked with a tool which created a windows using a similar toolkit, never entered the message loop or made the window visible and just used the GL context. It could work to create a new thread, create the SDL window in that thread and just use GL calls.

This topic is closed to new replies.

Advertisement