Closed dtugend closed 9 years ago
It should me noted, that the crash only occurs for cvar mat_queue_mode != 0
Well I found a solution for myself, it is to let the render context be attached and not re-use it before the before the same old context comes in again (for one of the next View_Render calls) (and not set another context of course). Additional context switching can be emulated by using a wrapper context as first context set, that does the switching internally.
I am closing this, because I think Valve has other problems at the moment than quirks in a feature in Source 1 engine no one else seems to use.
It seems that
IMaterialSystem::SetRenderContext
:Is that correct?
I am asking since I am wondering about the correct usage pattern of SetRenderContext.
What I am trying to do: I am adding code at the end of
IBaseClientDLL::View_Render
as follows: 1) switch to a different context using SetRenderContext 2) basically callIBaseClientDLL::WriteSaveGameScreenshotOfSize
3) switch back to old contextI guess that is not the correct usage pattern, since it will lead to a crash as soon as the thread is going to be re-used for View_Render?