Sonya,

I just derived my own class from wxFrame and set up all the menus etc from the constructor as with any other wxWidgets program. I use wxAuiManager to control window layout. Your OSG window, derived from wxGLCanvas, is just another window, in my case it is a page in a wxAuiNotebook.

I process all events within wxWidgets, then pass on any OSG control events to the OSG system eg (in my wxGLCanvas derived class).

void RsvViewOSG::OnMouseDown(wxMouseEvent &event)
{
if(m_GraphicsWindow.valid()) m_GraphicsWindow->getEventQueue()->mouseButtonPress(event.GetX(), event.GetY(), button);
}

Cheers,
Roland


On 15/08/2014 4:36 PM, Sonya Blade wrote:
Thank You Roland,

I wonder how you create the toolbar and all other visual control stuffs in that application , during design time
or in run time?

IT's very interesting the provided code with wxWidgets 3.0.1 produces the below report and exits.

In my case provided code reports the following:
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 7272
[Inferior 1 (process 7272) exited with code 037777777777]
Debugger finished with status 0

Regards,

------------------------------------------------------------------------
Date: Fri, 15 Aug 2014 09:35:49 +1000
From: [email protected]
To: [email protected]
Subject: Re: [osg-users] Anyone succeed to integrate OSG in wxWidget 3.0

Hi Sonya,

I've been using OSG integrated with wxWidgets 3.0.0 successfully on both Linux and Windows. I remember that the osgviewerwx examples were written for older wx versions and wouldn't compile from about wxWidgets 2.9+. I found an updated example somewhere on the web - can't find it on my system now of course, but did find something at http://markmail.org/message/joahrfdjd4eqbswy.

My implementation is based on the modified osgviewerwx example.

Hope this helps.

Roland

I.leti metni

On 14/08/14 23:13, Sonya Blade wrote:

    Dear All,

    I'd like to know if anyone succeeded to integrate the OSG 3.0 into
    wxWidget_3.0.1? I tried ot follow the instructions given at the
    
http://trac.openscenegraph.org/projects/osg//wiki/Community/WindowingToolkits 
link
    but many of them are old and
    can not be addopted to the current OSG version. In my case If
    don't mingle OSG and wxWidget everything works fine, they
    work like charm on their own, but when mixed only the OSG blueish
    color shows up on wxFrame and no scene objects at all,
    even though I got 10 drawables.

    I know that it's completely shot in darkness w/o knowing further
    details of my configuration, but I can not post it here and
    expect someone to give me exactly what I need. What I need is
    simply, if anyone has experienced anything like that before
    and to share how figured it out. Because having the widget turn to
    OSG blue color is clear evidence to me that OSG and Widget
    are communicating.

    Your guidance will be appreciated,

    Regards,


    _______________________________________________
    osg-users mailing list
    [email protected]  
<mailto:[email protected]>
    http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to