RTT not working in Android [Irrlicht version 1.9]

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Karthik Sivam
Posts: 6
Joined: Mon Apr 21, 2014 6:54 am

RTT not working in Android [Irrlicht version 1.9]

Post 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?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

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

Post 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.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Karthik Sivam
Posts: 6
Joined: Mon Apr 21, 2014 6:54 am

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

Post 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.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

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

Post by Nadro »

Thanks for info. File COGLES2Texture.cpp is related to FBO in OGLES2 driver.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Karthik Sivam
Posts: 6
Joined: Mon Apr 21, 2014 6:54 am

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

Post 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(...).
Agent_X
Posts: 41
Joined: Sun Sep 16, 2012 3:44 am

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

Post by Agent_X »

Nadro have you made any progress on this?
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

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

Post 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.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Agent_X
Posts: 41
Joined: Sun Sep 16, 2012 3:44 am

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

Post 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...
Karthik Sivam
Posts: 6
Joined: Mon Apr 21, 2014 6:54 am

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

Post 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.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

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

Post 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).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply