Android Port

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby hybrid » Mon Apr 18, 2011 8:44 am

For which problem?
hybrid
Admin
 
Posts: 13943
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby skreamz_ » Sat Apr 23, 2011 11:28 am

skreamz_ wrote:hi there, hoping someone could help me.

im using ellis2323 android port. when my game loses focus either through the use of home button, back button or some other way. when the app gets refocused i get a black screen with white areas where my textures were.
ive tried reloading the textures without any luck, was just wondering how you all handle the loss and regain of focus?

Thank you.


found out what was going on here, a custom rom was the culprit.

btw if you use any of irrlichts gui you can expect random crashing especially when removing windows, or white, where there should be a texture when loaded from an event. this i due to android input coming from another thread. an easy fix for this is is to add all inputs into a queue and pop them out on the rendering thread of course this queue has to be thead safe.
skreamz_
 
Posts: 24
Joined: Sun Jan 17, 2010 9:56 pm

Postby pverlaine999 » Wed May 04, 2011 1:36 pm

Sorry for cross-posting, I tried to create my first application on Android, and I got extremely low fps. I described my issues (and my codes) in this post here.

Could someone give me a hint on what's going on?

Thanks

Paul
pverlaine999
 
Posts: 16
Joined: Wed May 04, 2011 12:30 pm

Postby Sfortza » Thu May 05, 2011 12:39 pm

Such error log was already published hear, but without any description.
Issue is in two lines
05-04 17:14:20.015: INFO/log(2744): GL_INVALID_ENUM
05-04 17:14:20.015: INFO/log(2744): Could not bind Texture

As a result the scene is rendered without textures.
This is reproduced on Samsung Galaxy Ace but didn't reproduced
on Nexus One, HTC Desire and Wildfire, Samsung Galaxy S.

What's wrong?

Thanks in advance.

05-04 17:14:19.975: INFO/log(2744): Using renderer: OpenGL ES-CM 1.1
05-04 17:14:19.975: INFO/log(2744): Qualcomm
05-04 17:14:19.975: INFO/log(2744): GL_AMD_compressed_3DC_texture GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_APPLE_texture_2D_limited_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888...(reduced)
05-04 17:14:20.015: INFO/log(2744): GL_INVALID_ENUM
05-04 17:14:20.015: INFO/log(2744): Could not bind Texture
05-04 17:14:20.055: INFO/Irrlicht(2744): createDevice r=2340400 w=320 h=480
05-04 17:14:20.055: INFO/Irrlicht(2744): getVideoDriver r=2341096
05-04 17:14:20.055: INFO/Irrlicht(2744): resize w=480 h=320

05-04 17:14:25.135: INFO/log(2744): Generated terrain data (256x256) in 5.0790 seconds
05-04 17:14:25.245: INFO/log(2744): Loaded texture
05-04 17:14:25.835: INFO/log(2744): Loaded texture
05-04 17:14:25.855: INFO/log(2744): Loaded texture
05-04 17:14:25.865: INFO/log(2744): Loaded texture
05-04 17:14:25.875: INFO/log(2744): Loaded texture
05-04 17:14:25.885: INFO/log(2744): Loaded texture
05-04 17:14:25.895: INFO/log(2744): Loaded texture
05-04 17:14:25.895: INFO/log(2744): Loaded texture
Sfortza
 
Posts: 39
Joined: Thu Mar 17, 2011 12:40 pm
Location: 184

Which version of Irrlicht?

Postby renzhi » Fri May 06, 2011 4:44 am

Hi,

Which version of Irrlicht is this port based on? I'd like to know what are the changes.

Thanks a lot for the work.
renzhi
 
Posts: 3
Joined: Fri May 06, 2011 2:43 am

Re: Which version of Irrlicht?

Postby Sfortza » Fri May 06, 2011 7:45 am

renzhi wrote:Hi,

Which version of Irrlicht is this port based on? I'd like to know what are the changes.

Thanks a lot for the work.


As told here https://gitorious.org/irrlichtandroid/pages/Home

"The port uses the svn ogl-es branch of irrlicht (version 1.7.0 beta) which provides
a functional port on iphone device. There is a preliminary port of OGLES2.0 driver.

Renderer is based on OpenGL ES 1.x and ES 2.x"

Thank you.
Sfortza
 
Posts: 39
Joined: Thu Mar 17, 2011 12:40 pm
Location: 184

tested ndk r5b

Postby gbox » Sat May 07, 2011 4:17 pm

I success build with ndk-r5b
thanks

it work well in only opengles1
http://cafe.naver.com/jcga

professor of Jelabukdo Game Engine Academy
gbox
 
Posts: 37
Joined: Mon May 01, 2006 3:41 am
Location: jeonju, korea

Postby Michel » Tue May 17, 2011 9:41 pm

gavin_pugh wrote:Hi,

Curious about the status of this port, specifically the one here:
http://gitorious.org/irrlichtandroid/

As-is, the code wasn't working for me. I am using vs-android http://code.google.com/p/vs-android/ instead of ndk-build though, possibly there's other issues introduced here.

The OpenGL ES 1 driver though works fine if I switch to it, hejeon details it a few posts above.

With adding a little more Java code to correctly setup GLES2, I was able to at least get it to run with ES2, but Sydney appears untextured. Anyone else getting the same problem?

The ES1 version though works just great, so I'm continuing along tinkering with that for now. Thanks a lot for putting this port together!

Oh, the other thing I noticed with ES2 is that a couple of shader files were missing from the /sdcard directory, these two:
- COGLES2ParallaxMap.fsh
- COGLES2ParallaxMap.vsh
The app won't boot without them. I grabbed both from the archive that kine posted instead:
http://www.megaupload.com/?d=AUV9R1L4


I had a very similar experience. Compiled the code with NDK-R5b and had to do a few modifications so that an OpenGLES 2 surface is created and also copy the two missing shaders.
Now I get an animation going but it's only a white profile agains a red background. I will dig into the shaders to see what is going on if I can.

Perhaps the changes I did are of interest to others? How can I check them in?
Michel
 
Posts: 3
Joined: Tue May 17, 2011 9:31 pm

Postby hybrid » Wed May 18, 2011 9:12 am

For changes to the Irrlicht sources you can submit a patch ticket at our patch tracker here: http://sourceforge.net/tracker/?group_i ... tid=540678
The Android device and java files are not yet part of the Irrlicht repository and have to be submitted elsewhere.
hybrid
Admin
 
Posts: 13943
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby Michel » Wed May 18, 2011 4:00 pm

hybrid wrote:For changes to the Irrlicht sources you can submit a patch ticket at our patch tracker here: http://sourceforge.net/tracker/?group_i ... tid=540678
The Android device and java files are not yet part of the Irrlicht repository and have to be submitted elsewhere.

Thanks for the info. So far my changes are only to the java files, though soon I should have them in other parts as well.
Michel
 
Posts: 3
Joined: Tue May 17, 2011 9:31 pm

Postby Michel » Wed May 18, 2011 4:09 pm

I have Irrlicht working with OpenGL ES 2.0!!!! Yeaaaah! :D
As it turns out, the shaders are not consistent with the code. But, since I am a first time user/tester of irrlicht I am not sure on which side the problem is.

In short for those who know more about Irrlicht than I do, here are my observations:

In COGLES2FixedPipeline.vsh, the variable uUseTexture[0] is false, and thus the texture value is never set. I presume this is because the c++ code never sets it to true somehow. I forced the value of the texture to be given by:

varTexCoord[0] = inTexCoord0;

In COGLES2FixedPipeline.fsh, in renderSolid routine, it seems the value for varVertexColor is not a valid color (with each value between 0 and 1). Ignoring it and setting:

vec4 texel = texture2D(uTextureUnit0, varTexCoord[0].xy);
color = vec4(texel.x, texel.y, texel.z, 1.0);

will get you a working result.
Michel
 
Posts: 3
Joined: Tue May 17, 2011 9:31 pm

Postby mmortall » Wed Jun 08, 2011 8:51 pm

I try to build IrrlichtAndroid (git version) and get many errors when compile COGLESDriver.cpp

Looks like there is no gl.h.
Also I have no this folders:
$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/Include
$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Include
$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib

Is IrrlichtAndroid need this folders or any other external dependences ?
mmortall
 
Posts: 22
Joined: Tue May 11, 2010 6:36 am

Postby hybrid » Wed Jun 08, 2011 9:13 pm

Yes, you need the ogl-es libraries and includes. Adjust the paths to where your libs are installed. The mentioned paths are from the PowerVR SDK emulator.
hybrid
Admin
 
Posts: 13943
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby skreamz_ » Thu Jun 09, 2011 1:44 pm

and make sure your build target is 1.6 or higher
skreamz_
 
Posts: 24
Joined: Sun Jan 17, 2010 9:56 pm

Postby mmortall » Thu Jun 09, 2011 8:26 pm

I download latest Powerwr SDK end EGL headers from khronos.
Now I got errors that EglDisplay was not declared in COGLESDriver.cpp.
That is right because _IRR_ANDROID_PLATEFORM_ is defined.

COGLESDriver.h (382 line)
Code: Select all
#if defined(_IRR_COMPILE_WITH_IPHONE_DEVICE_)
      MIrrIPhoneDevice Device;
      GLuint ViewFramebuffer;
      GLuint ViewRenderbuffer;
      GLuint ViewDepthRenderbuffer;
#elif defined(_IRR_ANDROID_PLATEFORM_)
// TODO: ellis
// TODO: ajouter les champs
#else
      NativeWindowType EglWindow;
      EGLDisplay EglDisplay;
      EGLSurface EglSurface;
      EGLContext EglContext;
#endif


It is looks strange so I delete #else. After this action COGLESDriver.cpp is compiled successfully, but I got same error in COGLESExtensionHandler.cpp (EglDisplay was not declared).
mmortall
 
Posts: 22
Joined: Tue May 11, 2010 6:36 am

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest