Directx 11 and seperate rendering thread

Started by
1 comment, last by Nanook 11 years, 7 months ago
When I start my application I set up all the resources in the main thread, but when the game loop starts the rendering is done in a seperate thread. I will not be using directx in the main thread after the initial steps.

With opengl I use wglMakeCurrent to just use the context I created in the main thread and it works fine. Can I do something similar with directx or would I need to have a deferred context even when I'm not using the context from different threads at the same time?
Advertisement
Your setup requires no extra work to be made multi-threaded, except to simply pass a flag to the function that creates the context to inform it to be multi-thread-safe.
DirectX is not a state machine like OpenGL. Contexts can be used across threads freely. You only need to handle your own personal synchronization issues, which would be present no matter what API you use.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Okay great, thanks..

This topic is closed to new replies.

Advertisement