问题标签 [ogre]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
829 浏览

kinect - 食人魔 + Kinect + OpenNI

我正在开发一个程序,用户可以在其中移动人体网格,从 kinect 传感器获取关节!我从 Sinbad 示例开始,将其加载到项目中:一切正常!

下一步: - 在 Blender 中打开 Sinbad.blend - 只获取骨架 - 构建我自己的网格并将其“附加”到骨架

问题:当我加载 MyMesh 而不是 Sinbad.mesh 时,我的网格看起来完全扭曲并且很多骨骼以错误的方式移动!

这是解决我问题的正确方法吗?!

0 投票
1 回答
987 浏览

iphone - 使用 Ogre 创建示例应用程序

我为 iOS 安装了 OgreSDK。我安装了 Cmake,下载了 Ogre SDK,并下载了 iPhone 依赖项。

我已将 iPhone 依赖项放在 OgreSDK 中。然后我尝试运行 ogre.Xcodeproject,但出现以下错误:some config files are missing. 我已将文件添加到 bin 中,然后它运行成功。我为 XCode 安装了 Ogre 模板。

我开始创建我的第一个应用程序,但是当我尝试运行时,我收到了类似ogreCamera.h not found.

我已经检查了头搜索路径,它是否包含 OgreSDK 的根。这是正确的,我已经手动添加了它们。

然后我得到了这个错误ld:library not found for -lOIS Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang++ failed with exit code 1

请帮助我,我已经为此苦苦挣扎了一天。

提前致谢。

0 投票
2 回答
2505 浏览

c++ - 特定时间段后的 C++ 调用函数 - 无 Boost

我需要能够为 X 毫秒设置一个计时器,然后让它在它到期时调用一个函数。

我环顾四周,看到了一些使用 Boost\asio 的解决方案,但我无法使用 Boost。

理想情况下,我希望该解决方案可以在 Windows 和 Linux 上运行。这是一项艰巨的任务,我知道!

有谁知道我会怎么做?

编辑:程序是交互式的,所以我不能让线程进入睡眠状态。而且我宁愿不使用使用旋转的解决方案,即while(enough time hasn't elapsed) { }

0 投票
1 回答
245 浏览

c++ - 使用 Code::Blocks IDE 访问 Ogre3D 中的某些库

我正在尝试使用 code::blocks IDE 中的默认 GUI 构建工具在 64 位 Ubuntu 11.10 Linux 上运行 Ogre3D 示例游戏,但是,每次尝试构建我的应用程序时,我都会收到以下错误消息:
ld.bfd.real||cannot find -lOgreMain_d|
ld.bfd.real||cannot find -lOIS_d|
我完全很困惑,因为我已经尝试了所有想到的东西。

0 投票
1 回答
236 浏览

windows - 在我的 Ogre 应用程序中包含 Windows API 调用

我正在开发一个 Ogre 应用程序,我正在添加对触摸和手势的支持,因为我想在支持触摸的 PC 上使用它。

很好,在网上搜索后,我找到了 Windows Gestures API http://msdn.microsoft.com/en-us/library/windows/desktop/dd371578%28v=vs.85%29.aspx。它不仅支持触摸识别,还支持手势解释,听起来很棒!

我想将它包含在我的应用程序中,但我的问题是:这个 Windows 示例创建了自己的窗口,它自己的主循环,我如何使用我的 ogre 窗口将它包含在我的 ogre 应用程序中?

0 投票
1 回答
336 浏览

c++ - 使用 TDD 进行 Ogre 游戏编程

我想问一下,在使用Ogre用 C++ 创建 3D 游戏时使用TDD概念是否值得?我知道我可以在创建我的算法(如寻路、人工智能、分页等)和游戏逻辑时使用它,但它可以用于测试绘图方面吗?我的意思是如果绘制了正确的对象,是否设置并使用了正确的动画以及许多其他我不想列举的“事物”。

我已经搜索了几天,但我没有找到我可以接受的答案
基本上游戏开发的哪一部分应该使用TDD,哪一部分不应该?3D游戏开发需要TDD吗?

0 投票
1 回答
294 浏览

c++ - Hikari:背景动画

我有一个 OGre3D+Hikari 应用程序,我想在其背景中循环使用 Flash 动画。

我尝试调整 createFlashOverlay 中的一些参数(特别是 zorder 和层),但没有任何改变:我的叠加层仍然在我的 3d 食人魔网格之上,我希望它始终在后台。我能做什么?

谢谢!

0 投票
2 回答
79 浏览

c++ - 仅检索对象的类型

我正在使用 OGRE,但我遇到了一个与 ORGE 无关的问题,而是我正在处理的一个典型的 C++ 问题。ORGE 只是帮助解决问题的上下文。

有一个宏,例如

但是,为了调用 delete,我需要传入类的类型作为第二个参数。但是,比如说我有一个 base class A,然后class B, class C,class D等。如果我只存储一个std::vector指针A,但实际上我可能已经将它们实例化为B,C或 的一些衍生物A,我怎么能传递构造到这个宏中的实际类?当我去删除它时,我不知道派生对象是什么类型,我只知道有class A指针。

我想也许使用dynamic_cast,但是我不喜欢运行时性能,我还需要某种类型的查找表来检查。

0 投票
1 回答
635 浏览

opengl - Cg problems with OpenGL

I'm working on an OpenGL project on Windows, using GLEW to provide the functionality the provided Windows headers lack. For shader support, I'm using NVIDIA's Cg. All the documentation and code samples I have read indicate that the following is the correct method for loading an using shaders, and I've implemented things this way in my code:

  1. Create a Cg context with cgCreateContext.
  2. Get the latest vertex and pixel shader profiles using cgGLGetLatestProfile with CG_GL_VERTEX and CG_GL_FRAGMENT, respectively. Use cgGLSetContextOptimalOptions to create the optimal setup for both profiles.
  3. Using these profiles and shaders you have written, create shader programs using cgCreateProgramFromFile.
  4. Load the shader programs using cgGLLoadProgram.

Then, each frame, for an object that uses a given shader:

  1. Bind the desired shader(s) (vertex and/or pixel) using cgGLBindProgram.
  2. Enable the profile(s) for the desired shader(s) using cgGLEnableProfile.
  3. Retrieve and set any needed uniform shader parameters using cgGetNamedParameter and the various parameter setting functions.
  4. Render your object normally
  5. Clean up the shader by calling cgGLDisableProfile

However, things start getting strange. When using a single shader everything works just fine, but the act of loading a second shader with cgGLLoadProgram seems to make objects using the first one cease to render. Switching the draw order seems to resolve the issue, but that's hardly a fix. This problem occurs on both my and my partner's laptops (fairly recent machines with Intel integrated chipsets).

I tested the same code on my desktop with a GeForce GTX 260, and everything worked fine. I would just write this off as my laptop GPU not getting along with Cg, but I've successfully built and run programs that use several Cg shaders simultaneously on my laptop using the OGRE graphics engine (unfortunately the assignment I'm currently working on is for a computer graphics class, so I can't just use OGRE).

In conclusion, I'm stumped. What is OGRE doing that my code is not? Am I using Cg improperly?

0 投票
1 回答
1025 浏览

include - Mac Ogre Xcode 项目找不到标题

在尝试使模板 Xcode 4 ogre 项目工作时,构建失败,因为它找不到 OgreCamera.h。

我已将 Ogre 安装到 /opt/local/lib/OGRE,并在创建 Xcode 4 项目时将其指定为 Ogre SDK 位置。

不用说,项目设置中的头文件和框架包含路径精确指向所有头文件的位置,但找不到其中一个。我尝试注释掉 OgreCamera.h 的包含,在尝试运行时,找不到下一个包含 OgreEntity.h。将其注释掉并再次运行,找不到下一个包含,依此类推(这些包含在 OgreFramework.h 中。

我不明白为什么这些标头(当我在 Finder 或终端中查找它们时明显存在)无法被项目找到,即使我像这样指定它们的完整路径:

我是否以某种方式错误地安装了 Ogre SDK?(我将它从 DMG 复制到适当的位置……)