查看: 2482|回复: 7

ubuntu11.10 osg3.0 测试demo出错

[复制链接]

该用户从未签到

发表于 2012-11-9 19:40:22 | 显示全部楼层 |阅读模式
下载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

这是不是显卡驱动引起的? 我没专门安装显卡驱动,是默认安装的ubuntu系统。

该用户从未签到

 楼主| 发表于 2012-11-10 20:25:09 | 显示全部楼层
经确认,机器显卡是AMD的ATI HD6770。
安装显卡的3D加速后,问题仍然存在。
Screenshot at 2012-11-10 20:21:04.png

该用户从未签到

 楼主| 发表于 2012-11-10 21:10:13 | 显示全部楼层
以下是configure生成过程。

./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

该用户从未签到

发表于 2012-11-12 15:00:32 | 显示全部楼层
cmake过程中没有什么值得注意的,至于您的运行结果。第二个example.osg是因为您用了比较旧的文件格式,因此不再识别了。第一个cow.osg的问题我不太清楚,用不带纹理的cessna.osg是否也有一样的问题?

该用户从未签到

 楼主| 发表于 2012-11-12 18:08:50 | 显示全部楼层
多谢array的关注。

刚才做了一个更简单的测试,发现工作环境连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

现在真是迷惑极了。

该用户从未签到

 楼主| 发表于 2012-11-12 18:53:47 | 显示全部楼层
请问array, 这个网页上的问题及Robert的回答,跟我碰到的问题是不是同一类?刚接触osg,迷惑。

http://lists.openscenegraph.org/ ... ptember/001947.html

该用户从未签到

 楼主| 发表于 2012-11-14 16:28:54 | 显示全部楼层
I made it.
要正常安装驱动才行。确认驱动是否正常安装,可用fglrx命令。

该用户从未签到

发表于 2013-11-3 14:32:55 | 显示全部楼层
woshishui 发表于 2012-11-14 16:28
I made it.
要正常安装驱动才行。确认驱动是否正常安装,可用fglrx命令。

你好!我也遇到这个问题,我的是读字体的时候。请问你安装了什么驱动?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
快速回复 返回顶部 返回列表