跨平台的3D引擎中的iOS / Android的浏览嵌入? [英] Cross-Platform 3d-Engine to embed in iOS/Android-View?

查看:520
本文介绍了跨平台的3D引擎中的iOS / Android的浏览嵌入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关我的新的应用程序,我想有一个原生的iOS或Android的用户界面,再加上三维视图,显示一些图表。虽然我使用CSS最初的计划转换成在一个web视图,以达到理想的3D效果失败,因为表现并不附近可用的任何地方,我正在寻找另一种解决方案。以下是我认为我的选择是:

For my new app, I want to have a native iOS or Android UI, plus a 3d view that shows some graphs. While my initial plan to use CSS transforms in a WebView to achieve the desired 3d effect has failed because the performance was not anywhere near usable, I'm looking for another solution. Here are what I think are my options:

1。重新创建现场的OpenGL ES
我彻底重建我们的图形引擎在OpenGL。这当然是可能的,但可能是很难做到的人喜欢我究竟是谁之前从未做过的3D节目。有没有可能来港的OpenGL code为iOS写入到Android?或将我必须创建发动机两次?

1. Recreate the scene in OpenGL ES
I'd recreate our graphing engine completely in OpenGL. This would certainly be possible, but probably be very hard to do for people like me who actually never did 3d programming before. Would it be possible to port OpenGL code written for iOS to Android? Or would I have to create the engine twice?

2。使用现成的3D引擎像Unity3d
我绊了Unity3d,果酱和类似工具,可能会帮助我更轻松地创建的3D场景。然而,似乎在乍看之下像我就必须创建在各自的创作系统整个应用程序。我倒是要使用本机的控制任何东西,除了3D视图。这有可能在这些工具?如果是的话,是有可能从端口的iOS的3D到Android或反之亦然?

2. Use readymade 3d engine like Unity3d
I stumbled over Unity3d, Marmalade and similar tools that would probably help me create the 3d scenes more easily. However, it seems at a first glance like I would have to create the entire application in the respective authoring system. I'd to use native controls for anything except the 3d view. Is that possible in those tools? If yes, is it possible to port the 3d from iOS to Android or vice versa?

难道我问正确的问题;我都做了正确的假设?做任何事情听起来不对的吗?我错过了什么?

Did I ask the right questions; did I make the correct assumptions? Does anything sound wrong to you? What did I miss?

难道这些都是我有选择吗?还是有可能别的东西,有些种类的混合解决方案?

Are these all the options I have? Or is there maybe something else, a hybrid solution of some sorts?

哪个选项应该怎么选择呢?

Which option should I choose?

编辑::要澄清,我不想显示的3D视图中的iOS或Android的控制,而是围绕它:用户界面将是本土和3D部分将包含内一种观点。

To clarify, I don't want to show iOS or android controls inside the 3d view, but rather around it: The user interface would be native and the 3d part would be contained inside one view.

推荐答案

pretty的复杂的; - )

Pretty complex one ;-)

(1)的OpenGL与发动机:

我认为这将是可能写的OpenGL的code中的主要部分的方式,它是便携式的,例如使用Objective-C ++ iOS和NDK在Android(只是一个想法在C ++中,从来没有使用过NDK )。现在,它依赖于图形部分哪里去了。如果你说的图形,你的意思是,你只需要函数图像绘制在屏幕上?或者你有一个像多个对象的游戏或应用程序的架构在OpenGL中显示?

I think it would be possible to write the major part of the OpenGL code in a way that it is portable for example in C++ using Objective-C++ on iOS and NDK on Android (just an idea, never used NDK). Now it depends on the graphical part where to go. If you say graphs, do you mean you "only" need function graphs to plot on the screen? Or do you have more objects like in games or architectural apps to display in OpenGL?

如果是后者的情况下,会出现更大的问题是模型的无缝集成。含有超过一些立方体的每一个场景的设计是一个建模工具,可以导出为多种格式(OBJ,DAE,FBX,...)。但是你需要将其导入到你的应用程序。这就是游戏引擎来不管打是否团结,SIO2,博克,虚幻,乌龙茶,...

If the latter is the case, the bigger problem appears to be the seamless integration of models. Every scene containing more than some cubes is designed in a modelling tool and can be exported into several formats (obj, dae, fbx, ...). But then you need to import it into your app. That's where game engines come to play regardless whether Unity, SIO2, Bork, Unreal, Oolong, ...

如果你需要绘制图表,手动OpenGL的解决方案可能是值得考虑的问题。虽然即使这样,在现有的发动机,也许有用,因为OpenGL是不是直观的,你会需要一些时间来交朋友的一些研究。我没有直接使用OpenGL绘制多个图形与缩放,颜色,...在iPhone应用程序,但它是一个纯粹的研究项目和便携性是同样重要的。

If you need to plot graphs, the manual OpenGL solution might be worth to consider. Although even then some research on existing engine maybe useful because OpenGL isn't that intuitive and you will need some time to make friends. I did plotting multiple graphs with zooming, coloring, ... in an iPhone app using OpenGL directly but it was a pure research project and portability was less important.

(2)混合与OpenGL的GUI元素

基本上这是不可能的一个OpenGL视图中显示标准的UIButton。但是你可以有OpenGL的意见,并定期UI视图并在它们之间进行切换。我不知道,可以让你既做基于OpenGL的东西,并经常GUI编程,并进一步对平台的任何工具无关。

Basically it's not possible to display a standard UIButton within an OpenGL view. But you can have OpenGL views and regular UI views and switch between them. I don't know of any tool that allows you doing both OpenGL based stuff and regular GUI programming and further on platform independent.

因此​​,一方面需要建立在你所选择的工具,您的3D的东西,然后集成了本地UI code。对于团结和iOS有一些资源怎么办呢<一个href="http://stackoverflow.com/questions/8246917/how-to-access-unity-assets-natively-on-android-or-iphone">How原生地访问统一的资产在Android或iPhone?或<一href="http://stackoverflow.com/questions/4272413/mixing-unity-generated-$c$c-with-objective-c-in-ios/7076887#7076887">Mixing团结产生code与Objective-C的iOS中?

So on one hand you need to create your 3D stuff in the tool of your choice and then integrate native UI code. For Unity and iOS there some resources how to do it How to access Unity assets natively on Android or iPhone? or Mixing Unity generated code with Objective-C in iOS?

在另一方面,你需要一个独立于平台的框架,来完成常规GUI程序,让您可以在Android和iOS的运行它。我不熟悉这个话题,但我已经从基于Mono的框架听见了。

On the other hand you will need a platform independent framework to get regular GUI programming done so that you can run it on both Android and iOS. I am not familiar with this topic but I've heard from Mono based frameworks.

这篇关于跨平台的3D引擎中的iOS / Android的浏览嵌入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆