Re: [osg-users] osg::Switch node can't free memory
robertosfield wrote: > Hi John, > > On 30 May 2016 at 10:02, John Lee <> wrote: > > > It helps me. Now I load a lot of models in my scene, and each model is a > > scene node in the scene graph. Is there any method that i can decrease > > memory usage? > > > > Yes. > > That's a precise as I can answer at this stage. because you question > is completely open ended. > > You really need to tell us what on earth you are trying to achieve in > your application as how best to minimize memory usage depends TOTALLY > on the type of application your are developing, the type of data you > have and the target hardware. We know nothing about this. > > Robert. > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Hi Robert I am so sorry. In my appliction, I can load a lot of ive models dynamically. When i load about 120 ive models, the memory usage is about 2.5G, and the frame rate about 25-35. Now I want to minimize the memory usage to optimize my application because the camra can't see all objects. Now i don't know how to begin. I don't know whether you understand. Thank you for your reading and answer. Jhon. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67307#67307 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Multiples scenes
Hi Robert I gave a look to the osg::Switch and it's interesting too! I don't need to mix the two scenes, in addition I need to restore the position and the animation of the monsters. So I've opted for the "viewer.setSceneData(newModel);". It works well so far! Thanks for your answer! Florian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=67297#67297 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Bug touch point in win32
Thanks Nguyen, fix merged and submitted git master. On 25 April 2016 at 17:40, Nguyen Van Truongwrote: > I Use two touch screen in my App. I had a bug touch point in secondary > screen ( the touch point not same mouse push point). My code repair > > case WM_TOUCH: > / > { > unsigned int numInputs = (unsigned int) wParam; > TOUCHINPUT* ti = new TOUCHINPUT[numInputs]; > POINT pt; > osg::ref_ptr osg_event(NULL); > if(getTouchInputInfoFunc && > (*getTouchInputInfoFunc)((HTOUCHINPUT)lParam, numInputs, ti, > sizeof(TOUCHINPUT))) > { > // For each contact, dispatch the message to the > appropriate message handler. > for(unsigned int i=0; i< numInputs; ++i) > { > pt.x =TOUCH_COORD_TO_PIXEL(ti[i].x); > pt.y =TOUCH_COORD_TO_PIXEL(ti[i].y); > ScreenToClient(getHWND(), ); > if(ti[i].dwFlags & TOUCHEVENTF_DOWN) > { > if (!osg_event) { > osg_event = getEventQueue()->touchBegan( > ti[i].dwID, osgGA::GUIEventAdapter::TOUCH_BEGAN, pt.x, pt.y); > } else { > osg_event->addTouchPoint( ti[i].dwID, > osgGA::GUIEventAdapter::TOUCH_BEGAN, pt.x, pt.y); > } > } > else if(ti[i].dwFlags & TOUCHEVENTF_MOVE) > { > if (!osg_event) { > osg_event = getEventQueue()->touchMoved( > ti[i].dwID, osgGA::GUIEventAdapter::TOUCH_MOVED, pt.x, pt.y); > } else { > osg_event->addTouchPoint( ti[i].dwID, > osgGA::GUIEventAdapter::TOUCH_MOVED, pt.x, pt.y); > } > } > else if(ti[i].dwFlags & TOUCHEVENTF_UP) > { > // No double tap detection with RAW TOUCH > Events, sorry. > if (!osg_event) { > osg_event = getEventQueue()->touchEnded( > ti[i].dwID, osgGA::GUIEventAdapter::TOUCH_ENDED, pt.x, pt.y, 1); > } else { > osg_event->addTouchPoint( ti[i].dwID, > osgGA::GUIEventAdapter::TOUCH_ENDED, pt.x, pt.y); > } > } > } > } > if (closeTouchInputHandleFunc) > (*closeTouchInputHandleFunc)((HTOUCHINPUT)lParam); > delete [] ti; > } > break; ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org