OSG官网——GettingStarted翻译

本文提供了一步步的向导,帮助新手快速上手OpenSceneGraph的使用,包括下载、获取依赖、编译、运行示例、编写首个应用及调试等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Getting Started开始

Follows is a quick step by step guide to helping new OpenSceneGraph users get up to speed on how to use the software in their own application development work.

以下是一步一步的快捷向导可以帮助用户加速使用OSG。

1. Downloading the OpenSceneGraph下载OSG

You may download the OpenSceneGraph as a set of binaries or source code tarballs for the current release which can be found on the Stable Releases section, or use the Code Repositories or Developer Releases to check out the development version of the OpenSceneGraph to get latest additions, revisions and bug fixes. For beginners we'd recommend using the binaries or the source tarballs.

你可以下载OSG作为一个二进制文件或源代码包 在StableRelease部分中,或使用Code Repositories or Developer Releases 来检出OSG的开发版本来得到最新的版本。对于初学者,我们建议使用二进制或者源代码包。

2. Obtaining the pre-requisites tools/dependencies得到必备的工具和依赖

If you plan to compile the OpenSceneGraph you'll also need to the build system generator tool CMake 2.6.x (CMake 2.4.2+ may be used on older Linux/Unix systems) and an appropriate compiler suite for your platform, i.e. VisualStudio, g++ etc. For modern linux distributions you'll be able to pull down cmake, g++ and other dependencies directly from central repositories. It's possible to compile in mac using clang or Xcode.

如果你计划编译OSG,你需要构建工具CMake 2.6.x(CMake 2.4.2+可以用于老的Linux/Unix系统)以及一个适用于你的系统的编译器套件。例如: VisualStudio, g++等等。对于现代的Linux系统,你可以从中央库拖拽cmake, g++和其他的依赖目录。

You will need to download the dependencies which are listed in the Dependencies section. You don't need all the dependencies for the plugins as this are all options libraries, so don't worry about trying to get all the dependencies installed, you can always add further dependencies later if it turns out you need them for your project.

你需要下载Dependencies section依赖部分)中列出来的那些依赖。你不需要插件的所有的依赖,因为这是可选的库,因此不必担心尝试安装所有的依赖,你可以以后添加依赖如果你需要。

When running the examples its is useful to install the Sample Dataset so that the examples have some data to load, download it.

当运行例子的时候,安装Sample Dataset是很有必要的。

3. Compiling编译

OpenSceneGraph is a multiplatform library so take a look to platform specifics section to know how to compile in your desired platform or with your favorite compiler.

OSG是一个多平台的库因此可以看一看platform specifics 平台规范来在你喜欢的平台上做最爱的编译。

4. Running the examples 运行例子

OpenSceneGraph has an ever growing number of examples available for developers to learn from. Follow the Running Examples Guide to experiment and learn with them.

OSG有一个逐渐增长的例子。去Running Examples运行例子向导来做实验

5. Write your first application写你自己的第一个应用

Take one of the existing examples such as osgviewer as a base and modify it.以现存的例子为基础并修改它。

6. Debugging调试

Make use of the Debugging Tips to learn how to debug your application.

实验调试技巧来学习如何调试

7. Further resources进一步的资源

  • Books 书籍- Books to learn how to use OpenSceneGraph
  • Programming Guides编程向导 - programming with OpenSceneGraph
  • Reference Guides参考向导 - OpenSceneGraph API reference documentation
  • User Guides用户向导 - Applications and examples user guides
  • FAQ 最多问到的问题- Frequently Asked Questions
  • Tutorials教程 - programming tutorials/howtos.
  • Tips And Tricks 技巧- quick snippets of informtation that can help you along
  • Knowledge Base 知识库- Useful background knowledge

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值