Ogre Android

1649 篇文章 11 订阅
1407 篇文章 2 订阅

Most of this article is deprecated.

It is in fact possible to compile Ogre for Android now as is explained in this topic. 
Cmake Quick Start Guide for Android(external link)

  

Overview

Android is a Linux-based OS designed to be used on mobile and small computing devices (netbooks, embedded systems, tablets, etc.). It is present on a growing number of small computing devices and with the release of recent updates it has now given access to low-level OpenGL ES 2 features. 

Android and C++

Android officially supports native applications built using C or C++. Unfortunately the C++ for Android is currently too sparse for Ogre to be ported using the official development kit (called the NDK(external link)). The most serious feature missing the exception support. Since Ogre makes heavy use of exception, this missing feature would make it very difficult to create a stable port for Android. 

Luckily Android is a very open OS. We don't actually need to use the official NDK to develop native applications that work on Android devices. An awesome community member named Crystax(external link) has created versions of the NDK matched to official NDK releases which fully support C++. By using this custom build system we can create working native applications for Android without having to modify the underlying Android OS.

Porting Ogre to Android

When porting Ogre to any new OS the most important element is the Render system. This subsystem encapsulates all of the specifics pertaining to the platform (Android) and the 3D API (OpenGL ES 2). Since GLES2 has a strict standard we can borrow liberally from other GLES2 platforms (like the iPhone). In fact we can just compile against much of the existing GLES2 RenderSystem.

There are still parts that are very OS specific. On many platforms these pieces (like the RenderWindow, and the GL context wrappers) have a large amount of functionality in them. The current version of the Android port has very empty implementations of these classes. This is because much of the native OS resources like windows and GL contexts must be managed from within Java. That leaves little for the C++ side to do. By the time the Ogre rendering system is called, these resources have already been created and set up.

Build Systems

Android's build system is based on makefiles and GCC. However, these systems have been customized for the Android OS. The makefiles are slightly different than they would be for other platforms. For that reason no CMake target currently exists for Android. The makefiles must be hand-made and the native libraries should fit into the expected Android project structure. Below are links to the makefile I currently use to build the Ogre sample browser, as well as the misc. other classes and functions which I use to interact with the Java environment and Android's asset system.

 


Alias: OgreAndroid 

Contributors to this page: Emerich41 points  , spacegaier6073 points  and jacmoe180265 points  . 
Page last modified on Saturday 09 of March, 2013 10:17:08 UTC by Emerich41 points .

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值