Hi,

On Thu, 2011-12-08 at 10:47 +0100, "Christoph Fünfzig" wrote:
> Hi all,
> 
> >
> Attached is an example program using two windows:
> a GLUT window and a WIN32 window (created with WIN32 API directly; sorry 
> Windows only ;) ).
> The only place where aspects are assigned is the thread start
>     thread->runFunction(::ThreadProc, // thread function
>             1,            // aspect id
>             NULL);        // thread argument
> 
> I am totally unsure if it is correct like that? I would really appreciate if 
> someone
> who used it before could have a look ..

I'm looking into it, from a first look (windows version still building),
I saw a two main things

you do not apply the changes from the app aspect to aspect 1 and your
window in the second thread still uses the aspect 0 tree.

I'll try to update you example so that the main steps are in there.

A minor note, the WindowDrawTask is something from deep within the
RenderingBackend and will not help here, it is really not meant to be
an app thread. Anyway using runFunction on it means you use it as a
normal OSG::Thread so better to just stay with OSG::Thread.

> Unfortunately, it crashes when accessing one of the texture images in the 
> thread function, see call stack
> (MS Visual Studio 2008 SE, Windows 7 64bit).
> I can offer to document or summarize this part of the system
> when I finished exploring :)

the crash might be conflicting access when both threads use the same
objects from aspect 0. Without seeing what the second thread is doing,
it is hard to tell. 

kind regards
  gerrit




------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to