Re: [osg-users] undefined reference
Hi Joshua, I'm afraid I'm just human, but hopefully will do. Add OSGWIDGET_LIBRARY is the list of libraries. Robert. On 26 May 2015 at 06:34, Joshua Robinson shooki.robin...@gmail.com wrote: Howdy Romulans Vulcans, Newbie to OSG, trying to compile sample program osgWidget, get the following error ... any help is appreciated. undefined reference to `osgWidget::Widget::addColor(float, float, float, float, osgWidget::Widget::Corner)' ## #cmake file - For ALL myProjects # cmake_minimum_required(VERSION 2.8) set(PROJECT_VERSION 1.0) set(EXECUTABLE_OUTPUT_PATH ./ ) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} /usr/local/lib/cmake/ /usr/lib/cmake) set(PROJECT_NAME home-prj01) # project(${PROJECT_NAME}) # include_directories(${GNULIBS_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIRS} ${AR_DIRS} ${OpenCV_INCLUDE_DIRS} ${OPENSCENEGRAPH_INCLUDE_DIRS} ./dep/include) # Find Packages FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenSceneGraph REQUIRED) FIND_PACKAGE(osgREQUIRED) FIND_PACKAGE(osgDB REQUIRED) FIND_PACKAGE(osgGA REQUIRED) FIND_PACKAGE(osgViewer REQUIRED) FIND_PACKAGE(osgWidget REQUIRED) FIND_PACKAGE(osgUtilREQUIRED) FIND_PACKAGE(OpenThreadsREQUIRED) FIND_PACKAGE(OpenCV REQUIRED) FIND_PACKAGE(aruco REQUIRED) # file( GLOB SOURCE *.h osgWidgetCanvas.cpp ) # set(myOGL_LIBS ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES}) set(myOSG_LIBS ${OSG_LIBRARY} ${OSG_LIBS} ${OSGGA_LIBRARY} ${OSGDB_LIBRARY} ${OSGVIEWER_LIBRARY} ${OSGUTIL_LIBRARY} ${OSG} ${OPENSCENEGRAPH_LIBRARIES} ${OPENTHREADS_LIBRARY}) set(myAR_LIBS ${aruco_LIBS}) set(myOCV_LIB ${OpenCV_LIBS}) set(ALL_LIBRARIES ${myOGL_LIBS} ${myOSG_LIBS} ${myOCV_LIBS} ${myAR_LIBS}) # link_directories(${OpenCV_LIB_DIR} ${OPENSCENEGRAPH_LIBRARY_DIR} ./dep/lib) add_executable(${PROJECT_NAME} ${SOURCE}) target_link_libraries(${PROJECT_NAME} ${ALL_LIBRARIES}) # end What library am I missing ? Cheers, -Joshua Robinson Live long and prosper - Spock, a volcan. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] undefined reference
Howdy Robert, In the name of a member of the Inter-galactic-federation I thank-thee. Cheers, -Joshua Robinson Live long and prosper On Tue, May 26, 2015 at 4:01 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Joshua, I'm afraid I'm just human, but hopefully will do. Add OSGWIDGET_LIBRARY is the list of libraries. Robert. On 26 May 2015 at 06:34, Joshua Robinson shooki.robin...@gmail.com wrote: Howdy Romulans Vulcans, Newbie to OSG, trying to compile sample program osgWidget, get the following error ... any help is appreciated. undefined reference to `osgWidget::Widget::addColor(float, float, float, float, osgWidget::Widget::Corner)' ## #cmake file - For ALL myProjects # cmake_minimum_required(VERSION 2.8) set(PROJECT_VERSION 1.0) set(EXECUTABLE_OUTPUT_PATH ./ ) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} /usr/local/lib/cmake/ /usr/lib/cmake) set(PROJECT_NAME home-prj01) # project(${PROJECT_NAME}) # include_directories(${GNULIBS_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIRS} ${AR_DIRS} ${OpenCV_INCLUDE_DIRS} ${OPENSCENEGRAPH_INCLUDE_DIRS} ./dep/include) # Find Packages FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenSceneGraph REQUIRED) FIND_PACKAGE(osgREQUIRED) FIND_PACKAGE(osgDB REQUIRED) FIND_PACKAGE(osgGA REQUIRED) FIND_PACKAGE(osgViewer REQUIRED) FIND_PACKAGE(osgWidget REQUIRED) FIND_PACKAGE(osgUtilREQUIRED) FIND_PACKAGE(OpenThreadsREQUIRED) FIND_PACKAGE(OpenCV REQUIRED) FIND_PACKAGE(aruco REQUIRED) # file( GLOB SOURCE *.h osgWidgetCanvas.cpp ) # set(myOGL_LIBS ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES}) set(myOSG_LIBS ${OSG_LIBRARY} ${OSG_LIBS} ${OSGGA_LIBRARY} ${OSGDB_LIBRARY} ${OSGVIEWER_LIBRARY} ${OSGUTIL_LIBRARY} ${OSG} ${OPENSCENEGRAPH_LIBRARIES} ${OPENTHREADS_LIBRARY}) set(myAR_LIBS ${aruco_LIBS}) set(myOCV_LIB ${OpenCV_LIBS}) set(ALL_LIBRARIES ${myOGL_LIBS} ${myOSG_LIBS} ${myOCV_LIBS} ${myAR_LIBS}) # link_directories(${OpenCV_LIB_DIR} ${OPENSCENEGRAPH_LIBRARY_DIR} ./dep/lib) add_executable(${PROJECT_NAME} ${SOURCE}) target_link_libraries(${PROJECT_NAME} ${ALL_LIBRARIES}) # end What library am I missing ? Cheers, -Joshua Robinson Live long and prosper - Spock, a volcan. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Global draw callback
Hi Robert, I understand not wanting to add extra overhead. I'll look into the custom RenderBin approach. Also, I noticed the RenderLeaf::render method is virtual, but I don't see any way to provide a custom RenderLeaf class. The creation seems to be hard-coded within CullVisitor. Was this class originally designed to allow custom implementations? Cheers, Farshid On Tue, May 26, 2015 at 10:29 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Farshid, Added a if call on an inner loop of the draw dispatch traversal just for the purpose of niche debugging isn't something I feel is justifying as there will be CPU cost for everyone, even though very few people will use that feature. This type of customization would be better done via a custom RenderBin that overrides the RenderBin::drawImplementation(..); This way only those who need this customization would pay the extra cost of it. Robert. On 26 May 2015 at 18:24, Farshid Lashkari fla...@gmail.com wrote: Hi Robert, I've run into the situation multiple times where having a global draw callback would have been very convenient. It's mostly been for debugging scenarios, but I can also see other situations where being able to globally augment draw calls would also be useful. What are your thoughts on having a global draw callback part of the osg::State object? It doesn't seem like much code would need to be changed, and the performance impact should be minimal. Essentially, osgUtil::RenderLeaf would be modified to call: state.draw(_drawable, renderInfo); And osg::State::draw would look like: if(_drawCallback.valid()) _drawCallback-draw(_drawable, renderInfo); else _drawable-draw(renderInfo); Does this seem like a reasonable feature to add? I can work on a patch if you feel it's appropriate. Cheers, Farshid ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Global draw callback
Hi Farshid, Added a if call on an inner loop of the draw dispatch traversal just for the purpose of niche debugging isn't something I feel is justifying as there will be CPU cost for everyone, even though very few people will use that feature. This type of customization would be better done via a custom RenderBin that overrides the RenderBin::drawImplementation(..); This way only those who need this customization would pay the extra cost of it. Robert. On 26 May 2015 at 18:24, Farshid Lashkari fla...@gmail.com wrote: Hi Robert, I've run into the situation multiple times where having a global draw callback would have been very convenient. It's mostly been for debugging scenarios, but I can also see other situations where being able to globally augment draw calls would also be useful. What are your thoughts on having a global draw callback part of the osg::State object? It doesn't seem like much code would need to be changed, and the performance impact should be minimal. Essentially, osgUtil::RenderLeaf would be modified to call: state.draw(_drawable, renderInfo); And osg::State::draw would look like: if(_drawCallback.valid()) _drawCallback-draw(_drawable, renderInfo); else _drawable-draw(renderInfo); Does this seem like a reasonable feature to add? I can work on a patch if you feel it's appropriate. Cheers, Farshid ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Global draw callback
Hi Robert, I've run into the situation multiple times where having a global draw callback would have been very convenient. It's mostly been for debugging scenarios, but I can also see other situations where being able to globally augment draw calls would also be useful. What are your thoughts on having a global draw callback part of the osg::State object? It doesn't seem like much code would need to be changed, and the performance impact should be minimal. Essentially, osgUtil::RenderLeaf would be modified to call: state.draw(_drawable, renderInfo); And osg::State::draw would look like: if(_drawCallback.valid()) _drawCallback-draw(_drawable, renderInfo); else _drawable-draw(renderInfo); Does this seem like a reasonable feature to add? I can work on a patch if you feel it's appropriate. Cheers, Farshid ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org