Page 1 of 1

RTT not working in Android [Irrlicht version 1.9]

Posted: Mon Apr 21, 2014 7:17 am
by Karthik Sivam
I'm working on an Android NDK project in which I have to use addRenderTargetTexture, but it shows the following error during runtime:

Code: Select all

04-21 13:13:59.816: I/Irrlicht(3721): GL_INVALID_ENUM
04-21 13:13:59.816: I/Irrlicht(3721): FBO missing an image attachment
04-21 13:13:59.816: I/Irrlicht(3721): FBO error
04-21 13:13:59.866: I/Irrlicht(3721): FBO error
04-21 13:13:59.866: I/Irrlicht(3721): FBO incomplete
I have verified everything on my side. What may be the cause for this error?

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Mon Apr 21, 2014 10:40 am
by Nadro
Code related to RTT will be rewritten in upcoming days, so if it's a bug in an engine it'll be fixed. So thanks for a report, however it'll be nice to know which driver did you use OGLES1 or OGLES2 + device model.

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Mon Apr 21, 2014 12:20 pm
by Karthik Sivam
Thanks for your reply. I'm using driver: OGLES2 and device: Android Emulator(Android 4.3 API Level-18). I'm also working on fixing the bug, so it'll be useful for me if you provide the class names and method names I have to look for one.

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Mon Apr 21, 2014 1:00 pm
by Nadro
Thanks for info. File COGLES2Texture.cpp is related to FBO in OGLES2 driver.

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Mon Apr 21, 2014 2:14 pm
by Karthik Sivam
GL_INVALID_ENUM occurs in COGLES2Driver::testGLError() while get called from COGLES2FBOTexture::COGLES2FBOTexture(...) [AFAIK this may be due to the GLenum TextureType passed] and GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT in checkOGLES2FBOStatus(COGLES2Driver* Driver) while getting called from COGLES2FBOTexture::COGLES2FBOTexture(...).

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Tue May 06, 2014 8:30 pm
by Agent_X
Nadro have you made any progress on this?

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Wed May 07, 2014 8:04 am
by Nadro
Not yet, I'm finishing other tasks - separate blending (trunk and ogl-es) and multiple vertex buffers handling (in shader-pipeline). When I'll finish these tasks I'll work with RT textures.

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Wed May 07, 2014 1:49 pm
by Agent_X
Ok awesome :) I'll just continue working on the Windows and Linux versions of my project and keep my fingers crossed for RTT on Android...

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Thu May 08, 2014 6:56 am
by Karthik Sivam
Adding the line

Code: Select all

TextureType = GL_TEXTURE_2D;
in function

Code: Select all

COGLES2FBOTexture::COGLES2FBOTexture(const core::dimension2d<u32>& size,
                    const io::path& name, COGLES2Driver* driver,
                    ECOLOR_FORMAT format)
(COGLES2Texture.cpp) before first call to

Code: Select all

Driver->getBridgeCalls()->setTexture()
solved the issue in device.[Currently using Samsung Galaxy Tab 3]. But still it doesn't work properly in Android Emulator.

Re: RTT not working in Android [Irrlicht version 1.9]

Posted: Thu May 22, 2014 5:09 pm
by Nadro
The latest ogl-es branch has fixed FBO issues for both OpenGL ES1 and ES2 drivers.

Make sure that you have enabled GPU emulation in Android Emulator (without it FBO will be not working properly).