Page 1 of 1

can't show anything if i use mult thread and mult camera in unity

Posted: 23 May 2019, 12:30
by shawn
I am trying to separate noesisui thread and unity render thread in unity! I invoked View.Update in ui thread and NoesisRenderer.RenderXXX in Unity Thread. it worked fine. but I encounted some problem that there was nothing showing when I created more than one View and Camera. the noesis ver is 2.2.2 and unity version is 2018.4.01
emm. it's seems my fault! it can display right now, but sometime times unity crashs.it's probably my problem. but could you supply the pdb file ,so that i may guess what happens

Re: can't show anything if i use mult thread and mult camera in unity

Posted: 24 May 2019, 05:21
by shawn
emm. it's seems my fault! it can display right now, but sometime times unity crashs.it's probably my problem. but could you supply the pdb file ,so that i may guess what happens

Re: can't show anything if i use mult thread and mult camera in unity

Posted: 24 May 2019, 14:57
by ducdanganhit
I am trying to separate noesisui thread and unity render thread in unity! I invoked View.Update in ui thread and NoesisRenderer.RenderXXX in Unity Thread. it worked fine. but I encounted some problem that there was nothing showing when I created more than one View and Camera. the noesis ver is 2.2.2 and unity version is 2018.4.01
emm. it's seems my fault! it can display right now, but sometime times unity crashs.it's probably my problem. but could you supply the pdb file ,so that i may guess what happens
Did you try with normal thread ? Not Unity thread.

Re: can't show anything if i use mult thread and mult camera in unity

Posted: 25 May 2019, 10:33
by jsantos
Could you elaborate a bit more about what you are trying to achieve? The Rendering Architecture Guide is probably useful here. Inspecting our NoesisView implementation is the best way to discover how to implement custom scenarios. The file NoesisRenderer.cs contains all the resources you need to interact with the Render thread in Unity. It must be done this way, because the render thread is not available in C#, it is internally implemented in C++.

Re: can't show anything if i use mult thread and mult camera in unity

Posted: 27 May 2019, 09:44
by shawn
Could you elaborate a bit more about what you are trying to achieve? The Rendering Architecture Guide is probably useful here. Inspecting our NoesisView implementation is the best way to discover how to implement custom scenarios. The file NoesisRenderer.cs contains all the resources you need to interact with the Render thread in Unity. It must be done this way, because the render thread is not available in C#, it is internally implemented in C++.
Yes,Because my business code run in sub thread,I have saw the Rendering Architecture Guide. I have refered your NoesisView and modified it to make it support multthread.
For example, I invok (Noesis.View view = new Noesis.View(FrameworkElement ele),view.Update(double time),view.TouchUp TouchDown TouchMove KeyDown etc..) in ui thread(sub thread).
I invok
NoesisRenderer.RenderOnscreen(View, FlipRender(), _commands);
                Graphics.ExecuteCommandBuffer(_commands);
                GL.InvalidateState();
ect... on main tread(unity main thread).

but i am not sure if this is a good idea. could you give me some advice?

Re: can't show anything if i use mult thread and mult camera in unity

Posted: 28 May 2019, 10:35
by jsantos
but i am not sure if this is a good idea. could you give me some advice?
Well, I don't see anything conceptually wrong but I am not sure if Unity allows that kind of things. Could you open a private ticket about the PDB? I will send you a copy.

Re: can't show anything if i use mult thread and mult camera in unity

Posted: 29 May 2019, 03:42
by shawn
but i am not sure if this is a good idea. could you give me some advice?
Well, I don't see anything conceptually wrong but I am not sure if Unity allows that kind of things. Could you open a private ticket about the PDB? I will send you a copy.
Yes! it can work but has some problem. I will continue to explore it.
I applied a new private ticket herehttps://www.noesisengine.com/bugs/view.php?id=1478,
Thank you so much,

Re: can't show anything if i use mult thread and mult camera in unity

Posted: 29 May 2019, 10:23
by jsantos
PDB sent