Re: [osg-users] Feedback/guidance sought on move of osgQt out into it's own project/repository
Mathieu wrote: > > Anyone out there wanting to chip in ? > I can help - my time is very limited though. At the very least I can feedback on the documentation, setup and use. I have past experience with Qt/OSG/Delta3D and am currently reviving all that knowledge on a personal project which combines Qt5/OSG. Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68597#68597 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] PagedLOD range for 2D image tiles
Hello, I have a pagedLOD engine setup, for displaying big images (1x1 pixels) I subdivided these images in an pyramid with several scales (starting, for instance, at 0.125 of the image size and going up to 1.0 of the image size) Everything is displaying correctly, except that I don't understand how to setup the PagedLod range for my pyramid, so that only a certain pyramid scale appears at a time. For now, I have this, lod->setRangeMode(osg::LOD::RangeMode::PIXEL_SIZE_ON_SCREEN); lod->setRange(0, 0, FLT_MAX); So obviously all tiles display at once. How can I setup this so that only a certain pyramid level is displayed at a time? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] invalid use of incomplete type ‘std::ifstream in readNodeFile
Hi Kyungsoo, You'll need to track down why the Cmake find script for OpenThreads didn't find it. Any chance it's not installed. FYI, During dev work I don't install, instead just point the lib and bin paths (LD_LIBRARY_PATH and PATH) and CMake to my OpenSceneGraph directory using the OSG_DIR directory. This allows CMake to handle cases where you don't even install the OSG. The Cmake scripts should also be able to find the include and libs if you have installed them in standard places. Run ccmake and then have a look at the directories that CMake has found for OpenThreads/OSG, this might give you a clue to what might be amiss. Robert. Robert. On 13 September 2016 at 18:38, kyungsoo hong wrote: > Hi, > > I tried with > FIND_PACKAGE(OpenThreads) > but it failed to find package. > > /etc/ld.so.conf.d/openscenegraph.conf already exist > with "/usr/local/lib64" > > of course /usr/loca/lib64/ there are all so filese > > > > > ... > > Thank you! > > Cheers, > kyungsoo > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=68594#68594 > > > > > > ___ > 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: invalid use of incomplete type ‘std::ifstream in readNodeFile
Hi, I tried with FIND_PACKAGE(OpenThreads) but it failed to find package. /etc/ld.so.conf.d/openscenegraph.conf already exist with "/usr/local/lib64" of course /usr/loca/lib64/ there are all so filese ... Thank you! Cheers, kyungsoo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68594#68594 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] invalid use of incomplete type ‘std::ifstream in readNodeFile
Hi Hong, Thanks for the example code. You're Cmake script is hardwired to certain locations of the OSG I've created a CMakeLists.txt file that is a bit more flexible utilizing the CMake find scripts for the OSG. Attached, I can build and run the example using this cmake script without problems against the OSG-3.4 branch and master. I don't have 3.4.0 on my system right now so can't test it right away. The compiler version that my OSG is building against is: > c++ --version c++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609 Could you try the CMakeLists.txt attached and see if you can reproduce the compile problem. Robert. On 13 September 2016 at 16:37, kyungsoo hong wrote: > Hi, > > this is the whole code > #include > #include > #include > > int main() { > osg::ref_ptr root = osgDB::readNodeFile( > std::string("cessna.osg" )); > > osgViewer::Viewer viewer; > viewer.setSceneData( root.get() ); > return viewer.run(); > } > > and using cmake with below CMakeList > > cmake_minimum_required(VERSION 3.6) > project(osgTester) > set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") > > INCLUDE_DIRECTORIES(/usr/local/include/osg) > INCLUDE_DIRECTORIES(/usr/local/include/OpenThreads) > INCLUDE_DIRECTORIES(/usr/local/include/osgViewer) > INCLUDE_DIRECTORIES(/usr/local/include/osgDB) > INCLUDE_DIRECTORIES(/usr/local/include/osgUtil) > LINK_DIRECTORIES(/usr/local/lib64/) > > add_executable(osgTester main.cpp) > TARGET_LINK_LIBRARIES(osgTester osg OpenThreads osgViewer osgDB osgUtil) > > > > Thank you! > > Cheers, > kyungsoo > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=68592#68592 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org cmake_minimum_required(VERSION 2.6) SET(PROJECT_NAME test) PROJECT(${PROJECT_NAME}) FIND_PACKAGE(OpenThreads) FIND_PACKAGE(osg) FIND_PACKAGE(osgDB) FIND_PACKAGE(osgUtil) FIND_PACKAGE(osgGA) FIND_PACKAGE(osgViewer) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") SET(SOURCES main.cpp ) INCLUDE_DIRECTORIES(${OPENTHREADS_INCLUDE_DIR} ${OSG_INCLUDE_DIR}) LINK_DIRECTORIES(${OSG_LIB_DIR}) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OSG_LIBRARIES} ${OSGDB_LIBRARIES} ${OSGVIEWER_LIBRARIES} ${OSGUTIL_LIBRARIES} ${OSGGA_LIBRARIES} ${OPENTHREADS_LIBRARIES}) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: invalid use of incomplete type ‘std::ifstream in readNodeFile
Hi, this is the whole code #include #include #include int main() { osg::ref_ptr root = osgDB::readNodeFile( std::string("cessna.osg" )); osgViewer::Viewer viewer; viewer.setSceneData( root.get() ); return viewer.run(); } and using cmake with below CMakeList cmake_minimum_required(VERSION 3.6) project(osgTester) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") INCLUDE_DIRECTORIES(/usr/local/include/osg) INCLUDE_DIRECTORIES(/usr/local/include/OpenThreads) INCLUDE_DIRECTORIES(/usr/local/include/osgViewer) INCLUDE_DIRECTORIES(/usr/local/include/osgDB) INCLUDE_DIRECTORIES(/usr/local/include/osgUtil) LINK_DIRECTORIES(/usr/local/lib64/) add_executable(osgTester main.cpp) TARGET_LINK_LIBRARIES(osgTester osg OpenThreads osgViewer osgDB osgUtil) Thank you! Cheers, kyungsoo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68592#68592 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] invalid use of incomplete type ‘std::ifstream in readNodeFile
On 13 September 2016 at 13:10, kyungsoo hong wrote: > Hi, Robert > Thanks for the concern, > > I built it by myself i didn't see any compilation error. > if there was, even library wasn't created. If the OSG is building and contains very similar usage to the snippet you've posted then the difference has to be in the other code you have in your application that is somehow causing the problem. We can't provide an asnwer at what this might be as you haven't posted all the relevant code. Without any actual code to go on my best guess is that something in your include or define prior to including the OSG files is affecting what happens in the OSG header. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: invalid use of incomplete type ‘std::ifstream in readNodeFile
Hi, Robert Thanks for the concern, I built it by myself i didn't see any compilation error. if there was, even library wasn't created. ... Thank you! Cheers, kyungsoo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68590#68590 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] invalid use of incomplete type ‘std::ifstream in readNodeFile
Hi Kyungsoo, I used Kubuntu 16.04 for development and haven't seen an error like you've described so there must be something specific to your system that is causing the problem. Did you build the OSG youself or did you pull it into from a repository? If you built it yourself did you get any compile errors? Have you tried any other versions of the OSG? Robert. On 13 September 2016 at 00:34, kyungsoo hong wrote: > Hi, > > I'm newbie to osg, just installed and started 'hello world' with below code > osg::ref_ptr root = osgDB::readNodeFile( std::string("cessna.osg" > )); > > but I got error like this > In file included from /osgTester/main.cpp:2:0: > > /usr/local/include/osgDB/fstream:34:30: error: invalid use of incomplete type > ‘std::ifstream {aka class std::basic_ifstream}’ > class ifstream : public std::ifstream > ^ > In file included from /usr/include/c++/5/ios:38:0, > from /usr/include/c++/5/ostream:38, > from /usr/include/c++/5/iostream:39, > from /home/osgTester/main.cpp:1: > /usr/include/c++/5/iosfwd:116:11: note: declaration of ‘std::ifstream {aka > class std::basic_ifstream}’ > class basic_ifstream; > > using osg 3.4 on Ubuntu 16.04 > > Thank you! > > Cheers, > kyungsoo > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=68586#68586 > > > > > > ___ > 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
invalid use of incomplete type ‘std::ifstream in readNodeFile
Hi, I'm newbie to osg, just installed and started 'hello world' with below code osg::ref_ptr root = osgDB::readNodeFile( std::string("cessna.osg" )); but I got error like this In file included from /osgTester/main.cpp:2:0: /usr/local/include/osgDB/fstream:34:30: error: invalid use of incomplete type ‘std::ifstream {aka class std::basic_ifstream}’ class ifstream : public std::ifstream ^ In file included from /usr/include/c++/5/ios:38:0, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from /home/osgTester/main.cpp:1: /usr/include/c++/5/iosfwd:116:11: note: declaration of ‘std::ifstream {aka class std::basic_ifstream}’ class basic_ifstream; using osg 3.4 on Ubuntu 16.04 Thank you! Cheers, kyungsoo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68586#68586 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Better data loading
Ok thank you for your help, I'll do this. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=68588#68588 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org