Android Port
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Android Port
We are preparing the merge, but there are still some things to fix in the ogl-es branch before this happens. But Irrlicht 1.9 will contain the ogl-es drivers. So no need for this branch then anymore.
Re: Android Port
Hello
First, I hope there isn't any post with this problem. Yeah, I know there is the search-function, but...
ndk-build stops compiling because there is missing the GLES2/gl2.h
Where can I find this file? Or how can I let it compile correctly?
Thanks.
MynithiX
First, I hope there isn't any post with this problem. Yeah, I know there is the search-function, but...
ndk-build stops compiling because there is missing the GLES2/gl2.h
Code: Select all
Compile++ arm : irrlicht <= COGLES2Driver.cpp
In file included from jni/COGLES2Driver.h:44:0,
from jni/COGLES2Driver.cpp:6:
jni/COGLES2ExtensionHandler.h:18:23: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/irrlicht/COGLES2Driver.o] Error 1
Thanks.
MynithiX
Two things are infinite: the stupidity of the humans and universe. I'm just not sure if the universe is really infinite!
YOLO
YOLO
Re: Android Port
From which directory are you running ndk-build? Also which revision are you using? Like Nadro said, revision 4486 should work better.
The file is actually located in <ndk-root>/platforms/<desired platform>/something/something/includes/GLES.
The file is actually located in <ndk-root>/platforms/<desired platform>/something/something/includes/GLES.
Re: Android Port
Try defining missing _IRR_ANDROID_PLATFORM_ symbol in IrrCompileConfig or in Android.mk file - I had similar issue on 4486 without this extra flag. Btw while I succeded in compiling and linking Irrlicht with Android project, I receive a segfault when I irr::createDevice. I assume that 4486 is more or less stable, so it is propably my faule... what can I be doing wrong? Is there anything one should know when it comes to initializing Irrlicht in native activity?
Re: Android Port
hi
I'm learning to use offical port of irrlicht on android
now i came to a problem with texture, which some threads have already raised it up
with the latest branch from the irrlicht SF, i tried the example on my smartphone, however it failed display the texture
loading mesh is ok, but the object seems to be no textured
just turn on the ambient light, it's all white
i read through the threads but still don't know how to solve the problem
is there any advice?
I'm learning to use offical port of irrlicht on android
now i came to a problem with texture, which some threads have already raised it up
with the latest branch from the irrlicht SF, i tried the example on my smartphone, however it failed display the texture
loading mesh is ok, but the object seems to be no textured
just turn on the ambient light, it's all white
i read through the threads but still don't know how to solve the problem
is there any advice?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Android Port
Which driver do you use, ogl-es 1 or ogl-es 2? Did you ensure that you have the very latest SVN version?
Re: Android Port
ogl-es 2hybrid wrote:Which driver do you use, ogl-es 1 or ogl-es 2? Did you ensure that you have the very latest SVN version?
sorry for not posting the information in detail
i'm sure that i have the latest SVN version...
Re: Android Port
Android example is available (with tutorial in commit log) in ogl-es branch, so you can check it.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Android Port
so... is there something that doesn't work on android? something one should be aware of? does anyone have any personal experience developing commercial quality apps for android with irrlicht? i'm really interested in this, might use this for a project, just need some more info
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Re: Android Port
Currently build-in shaders (in OGL ES2.0) don't work properly, so you have to prepare your own shader. Also built-in shadows don't work in both OGL ES1 and ES2 drivers. Gyroscope support is missing too. Other Irrlicht features should work fine.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Android Port
Wow, that's pretty impressive. Basically nothing I'd miss, except perhaps for the gyroscope support. You can still use some NDK way of getting input from it, right?
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Re: Android Port
Yes, gyroscope support doesn't require too much of additional work. I'll implement it probably in next week, so if you don't need gyroscope for this time, you don't have to care about it.
BTW. FPS camera also doesn't work properly. I forget about this feature in my previous post.
BTW2. If you want to use Irrlicht as shared library (or other shared libraries eg. OpenAL) you have to use small java code, except it Irrlicht doesn't require any java files in project.
Example JAVA code for load shared libraries (put it in src/com/irrlicht/YourProject/YourProject.java):
It's important to set proper name in AndroidManifest.xml:
BTW. FPS camera also doesn't work properly. I forget about this feature in my previous post.
BTW2. If you want to use Irrlicht as shared library (or other shared libraries eg. OpenAL) you have to use small java code, except it Irrlicht doesn't require any java files in project.
Example JAVA code for load shared libraries (put it in src/com/irrlicht/YourProject/YourProject.java):
Code: Select all
package com.irrlicht.YourProject;
import android.app.Activity;
import android.app.NativeActivity;
import android.os.Bundle;
public class YourProject extends NativeActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
static
{
try
{
System.loadLibrary("OpenAL");
System.loadLibrary("Irrlicht");
System.loadLibrary("YourProject");
}
catch (UnsatisfiedLinkError err)
{
System.err.println("Library failed to load.\n" + err);
}
}
}
Code: Select all
<activity android:name=".YourProject" ...>
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Android Port
Thanks for that, I'm guessing OpenAL is what you guys use?
Also, is there some sort of tutorial to lead me through setting everything up?
Edit: I found the how-to in the svn: http://sourceforge.net/p/irrlicht/code/4528/
There is a missing include to COGLES2ExtensionHandler in COGLESTexture
Also there seems to be some problem with the final step where the library is copied to lib/Android, the file just keeps hanging in [...]/obj/local/armeabi/
Edit2: I'm getting a 67 MB libIrrlicht.a with or without specifying NDEBUG=1. Is this normal? Better yet, is there a way to help this?
Edit3: I had to move main.cpp into src/main.cpp. Also the assets don't copy correctly, i'm guessing those console commands were meant for linux.
Now i'm stuck on this, happens during ant debug:
Edit4: Ok I got it to work, you don't need to move main.cpp to src/, you just need to create src\(empty folder). I also had to move assets myself to assets/media/. As for the example 17, why is it so messy? You create a different scene depending on the platform, why?
Also, is there some sort of tutorial to lead me through setting everything up?
Edit: I found the how-to in the svn: http://sourceforge.net/p/irrlicht/code/4528/
There is a missing include to COGLES2ExtensionHandler in COGLESTexture
Also there seems to be some problem with the final step where the library is copied to lib/Android, the file just keeps hanging in [...]/obj/local/armeabi/
Edit2: I'm getting a 67 MB libIrrlicht.a with or without specifying NDEBUG=1. Is this normal? Better yet, is there a way to help this?
Edit3: I had to move main.cpp into src/main.cpp. Also the assets don't copy correctly, i'm guessing those console commands were meant for linux.
Now i'm stuck on this, happens during ant debug:
Code: Select all
BUILD FAILED
C:\Dev\android\adt-bundle-windows-x86_64-20130219\sdk\tools\ant\build.xml:650: T
he following error occurred while executing this line:
C:\Dev\android\adt-bundle-windows-x86_64-20130219\sdk\tools\ant\build.xml:691: n
ull returned: 1
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Re: Android Port
Well I tried the terrain example, first off it doesn't even render correctly:
Also I'm getting 14 FPS on a Nexus 7, maybe there's a bug with the terrain causing both the graphical glitch and the slowdown, either that or irrlicht is just effing slow on android.
Edit: I've tried the quake map example(sod the bugged terrain, right), I'm still getting around 14 FPS though, not quite sure why. This is logcat on the app startup: http://pastebin.com/SzrpbbYp, everything seems to be fine.
Also I'm getting 14 FPS on a Nexus 7, maybe there's a bug with the terrain causing both the graphical glitch and the slowdown, either that or irrlicht is just effing slow on android.
Edit: I've tried the quake map example(sod the bugged terrain, right), I'm still getting around 14 FPS though, not quite sure why. This is logcat on the app startup: http://pastebin.com/SzrpbbYp, everything seems to be fine.
Last edited by ent1ty on Sun Jun 02, 2013 6:41 pm, edited 1 time in total.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Re: Android Port
Ok I tried OpenGL ES 1.1 instead:
As you can see, everything's... blue. This was in log:
The FPS is on 60 though, i'm guessing it's capped there by android.
Edit: now that i've changed SIrrlichtCreationParameters.Bits from 24 (for ogl es 2.0) to 16, the error no longer shows in log. Everything's still blue though.
As you can see, everything's... blue. This was in log:
Code: Select all
E/Irrlicht( 8661): No full color buffer.
Edit: now that i've changed SIrrlichtCreationParameters.Bits from 24 (for ogl es 2.0) to 16, the error no longer shows in log. Everything's still blue though.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!