[osg-users] How to work with Delta3d in MFC SDI ?

2008-03-31 Thread Kama
Hi, all,
In OSGViewerMFC MDI or SDI, it begin a thread in OnInitialUpdate() of MFC_View: 
 mThreadHandle = (HANDLE)_beginthread(COSG::Render, 0, mOSG) ,
and in Render(void* ptr) function, it  likes this:
 while(!viewer-done())
 {
  osg-PreFrameUpdate();
  viewer-frame();
  osg-PostFrameUpdate();
 }

Well, if i do it with Delta3d in MFC SDI, how to put the Delta3d's function 
corresponding to make it work like that ?
I had a try with dtABC::Widget refered to the example testWidget, then i made 
it like this :
1. class MyWidget : public dtABC::Widget
2. void MyWidget::InitWinData(HWND hwnd, int x, int y, int w, int h)
{
  dtABC::WinData windata( hwnd, x, y, w, h );

  SendMessage( dtABC::Widget::msgWindowData, windata );
 SendMessage( setpath, path );
 SendMessage( loadfile, m_ModelFile );
}
3. void MyWidget::Render(void* ptr)
{
// I don't konw witch function i should put here!
}

4.void CD3DMFCView::OnInitialUpdate()
{
 CView::OnInitialUpdate();

 m_MyViewWidget-InitWinData();
   
   // Here, should i begin a thread like OSGViewerMFC does in its 
OnInitialUpdate() ?
   // m_ThreadHandle = (HANDLE)_beginthread(MyWidget::Render, 0, 
m_MyViewWidget); 
}

Thank you indeed for your patient

Best regardes !!!

2008-03-31 



Kama 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to work with Delta3d in MFC SDI ?

2008-03-31 Thread Michael Bosse'
What version of Delta3d are you using? Also, this question may be better
suited for the Delta3d forums http://www.delta3d.org/forum/index.php

On Mon, Mar 31, 2008 at 5:06 AM, Kama [EMAIL PROTECTED] wrote:

  Hi, all,
 In OSGViewerMFC MDI or SDI, it begin a thread in OnInitialUpdate() of
 MFC_View:
 * mThreadHandle = (HANDLE)_beginthread(COSG::Render, 0, mOSG) ,*
 and in *Render(void* ptr)* function, it  likes this:
 * while(!viewer-done())
  {
   osg-PreFrameUpdate();
   viewer-frame();
   osg-PostFrameUpdate();
  }*
 **
 Well, if i do it with Delta3d in MFC SDI, how to put the Delta3d's
 function corresponding to make it work like that ?
 I had a try with dtABC::Widget refered to the example testWidget, then i
 made it like this :
 1. class MyWidget : public dtABC::Widget
 2. void MyWidget::InitWinData(HWND hwnd, int x, int y, int w, int h)
 {
   dtABC::WinData windata( hwnd, x, y, w, h );

   SendMessage( dtABC::Widget::msgWindowData, windata );
  SendMessage( setpath, path );
  SendMessage( loadfile, m_ModelFile );
 }
 3. void MyWidget::Render(void* ptr)
 {
 // I don't konw witch function i should put here!
 }

 4.void CD3DMFCView::OnInitialUpdate()
 {
  CView::OnInitialUpdate();

  m_MyViewWidget-InitWinData();

// Here, should i begin a thread like OSGViewerMFC does in its
 OnInitialUpdate() ?
// m_ThreadHandle = (HANDLE)_beginthread(MyWidget::Render, 0,
 m_MyViewWidget); 
 }

 Thank you indeed for your patient

 Best regardes !!!

 2008-03-31
 --
 Kama

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
It is only necessary to make war with five things: with the maladies of the
body, with the ignorances of the mind, with the passions of the body, with
the seditions of the city, with the discords of families. - Tacitus

The desire for safety stands against every great and noble enterprise. -
Tacitus

Those who would give up essential liberty to purchase a little temporary
safety deserve neither liberty nor safety. - Benjamin Franklin

Numquam ponenda est pluralitas sine necessitate. - William of Ockham
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to work with Delta3d in MFC SDI ?

2008-03-31 Thread Kama
Thanks a lot !
I'm sorry to bother you all in this OSG-Users Group, but i have no idea to work 
it out, and the very bad thing is that i can not access the Delta3d forums in 
our country

I use Delta3d2.0.0, the very thing i want to know is what functions of Delta3d 
should i put in the static thread  function, which likes OSGViewerMFC example 
does that.

2008-04-01 



Kama 

On Mon, 31 Mar 2008 16:02:22, Michael Bosse' [EMAIL PROTECTED]wrote:

What version of Delta3d are you using? Also, this question may be better
suited for the Delta3d forums http://www.delta3d.org/forum/index.php


On Mon, Mar 31, 2008 at 5:06 AM, Kama [EMAIL PROTECTED] wrote:

  Hi, all,
 In OSGViewerMFC MDI or SDI, it begin a thread in OnInitialUpdate() of
 MFC_View:
 * mThreadHandle = (HANDLE)_beginthread(COSG::Render, 0, mOSG) ,*
 and in *Render(void* ptr)* function, it  likes this:
 * while(!viewer-done())
  {
   osg-PreFrameUpdate();
   viewer-frame();
   osg-PostFrameUpdate();
  }*
 **
 Well, if i do it with Delta3d in MFC SDI, how to put the Delta3d's
 function corresponding to make it work like that ?
 I had a try with dtABC::Widget refered to the example testWidget, then i
 made it like this :
 1. class MyWidget : public dtABC::Widget
 2. void MyWidget::InitWinData(HWND hwnd, int x, int y, int w, int h)
 {
   dtABC::WinData windata( hwnd, x, y, w, h );

   SendMessage( dtABC::Widget::msgWindowData, windata );
  SendMessage( setpath, path );
  SendMessage( loadfile, m_ModelFile );
 }
 3. void MyWidget::Render(void* ptr)
 {
 // I don't konw witch function i should put here!
 }

 4.void CD3DMFCView::OnInitialUpdate()
 {
  CView::OnInitialUpdate();

  m_MyViewWidget-InitWinData();

// Here, should i begin a thread like OSGViewerMFC does in its
 OnInitialUpdate() ?
// m_ThreadHandle = (HANDLE)_beginthread(MyWidget::Render, 0,
 m_MyViewWidget); 
 }

 Thank you indeed for your patient

 Best regardes !!!

 2008-03-31
 --
 Kama
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org