Jump to content
  • Advertisement
Sign in to follow this  
Syerjchep

Create SDL 2 renderer without a window?

This topic is 1070 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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? 

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!