Hi Robert,

1st Problem :

In fact the resize event is well propagated with the correct parameters
(good width and height values). The problem is not in the resize event, but
with the thread wich is responsible of calling frame().

After a long googling on threading with MFC, I've found there is 2 types of
thread :
- Worker thread
- User Interface thread

My application, derived from osgViewerMFC, used the _beginthread(&cOSG::Render,
0, mOSG); function, so the Render function could be considered as a worker
thread. And the MFC message loop isn't apparently compatible with thoses
working threads.

So I decided to create a UI (User Interface) thread based on CWinthread, and
in the Run function I call frame(). The resize are well handled and
everything is working fine, except a litlle flicking in resizing.

If I have the time I'll make a little example osgViewerMFC with this kind of
thread.

2nd Problem :

 I'm glad that you have reproduced the bug, loosing texture seems to me
connected to context ID too, but I hadn't the time to go further.


2008/6/26 Robert Osfield <[EMAIL PROTECTED]>:

> Hi Amalric,
>
>
> On Thu, Jun 26, 2008 at 11:54 AM, Robert Osfield
> <[EMAIL PROTECTED]> wrote:
> > Thanks for the example, I'll have a look at item 2 with this example
> > and see how I get on.
>
> I have your code compiled under Linux, and press 'k' to add a new view
> works fine, the textures are always there as expected, deleting the
> windows by pressing 'a' works fine too, but... when I press 'k' after
> pressing 'a' all the new windows created have white cows.  So thumbs
> up, I can recreate the bug, which is the first step towards.  I
> haven't started debugging yet, but my guess is that the contextID's
> aren't be incremented correctly for each new window once one window
> has been deleted.
>
> Robert.
>  _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Alexandre AMALRIC Ingénieur R&D
===================================
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to