下载osg3.0,编译通过。
下载了data包后,运行示例。
osgviewer OpenSceneGraph-Data-3.0.0/cow.osg
Got an X11ErrorHandling call display=0x1b67bb0 event=0x7fff7145a6e0
BadRequest (invalid request code or no such operation)
Major opcode: 155
Minor opcode: 19
Error code: 1
osgviewer OpenSceneGraph-Data-3.0.0/example.osg
Old osgAnimation file format update your data file
Old osgAnimation file format update your data file
./configure
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
-- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
CMake Warning at /usr/share/cmake-2.8/Modules/FindITK.cmake:48 (FIND_PACKAGE):
Could not find a configuration file for package ITK.
Set ITK_DIR to the directory containing a CMake configuration file for ITK.
The file will be called ITKConfig.cmake
Call Stack (most recent call first):
CMakeLists.txt:465 (FIND_PACKAGE)
-- Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
-- checking for module 'cairo'
-- package 'cairo' not found
-- checking for module 'poppler-glib'
-- package 'poppler-glib' not found
-- checking for module 'librsvg-2.0'
-- package 'librsvg-2.0' not found
-- checking for module 'cairo'
-- package 'cairo' not found
-- checking for module 'gtk+-2.0'
-- package 'gtk+-2.0' not found
-- checking for module 'gtkglext-x11-1.0'
-- package 'gtkglext-x11-1.0' not found
-- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_LIBRARY)
-- Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
CMake Warning (dev) at /usr/share/cmake-2.8/Modules/FindPNG.cmake:29 (find_package):
File /usr/share/cmake-2.8/Modules/FindPNG.cmake includes
/home/robot/OpenSceneGraph-3.0.1/CMakeModules/FindZLIB.cmake (found via
CMAKE_MODULE_PATH) which shadows
/usr/share/cmake-2.8/Modules/FindZLIB.cmake. This may cause errors later
on .
Policy CMP0017 is not set: Prefer files from the CMake module directory
when including from there. Run "cmake --help-policy CMP0017" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Call Stack (most recent call first):
CMakeLists.txt:535 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- checking for module 'xrandr'
-- package 'xrandr' not found
-- Configuring done
-- Generating done
刚才做了一个更简单的测试,发现工作环境连logo都不能正常显示。 osglogo
Warning: Could not find plugin to read objects from file "Images/land_shallow_topo_2048.jpg".
Warning: Could not find plugin to read objects from file "fonts/arial.ttf".
Got an X11ErrorHandling call display=0x221f4f0 event=0x7fff4bc51890
BadRequest (invalid request code or no such operation)
Major opcode: 155
Minor opcode: 19
Error code: 1
Request serial: 13
Current serial: 13
ResourceID: 23
Got an X11ErrorHandling call display=0x221f4f0 event=0x7fff4bc51890
BadRequest (invalid request code or no such operation)
Major opcode: 155
Minor opcode: 19
Error code: 1
Request serial: 14
Current serial: 14
ResourceID: 23
Got an X11ErrorHandling call display=0x221f4f0 event=0x7fff4bc518e0
至于你建议的测试用例,结果如下: osgviewer OpenSceneGraph-Data-3.0.0/cessna.osg
Got an X11ErrorHandling call display=0x2149450 event=0x7fffb0fded90
BadRequest (invalid request code or no such operation)
Major opcode: 155
Minor opcode: 19
Error code: 1
Request serial: 13
Current serial: 13
ResourceID: 23