Using Irrlicht GLES2 with other systems that use GLES

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
TheDoktor
Posts: 3
Joined: Sat Aug 13, 2011 5:32 pm

Using Irrlicht GLES2 with other systems that use GLES

Post by TheDoktor »

Hello

I'm currently using the GLES2 version of Irrlicht on iOS, when I use the API by itself everything works fine.
Recently however I have encountered a problem. I'm currently doing some experiments using the newly released Qualcomm AR middleware.
The idea is to use Qualcomm AR to calculate positions of the AR markers and to use this information in Irrlicht to render the scene as an AR overlay.
During the render pass it seems as though the Qualcomm AR is using GLES - probably to render the camera output as a background quad. This is changing the GLES render state and causing Irrlicht to stop rendering correctly. I can't be sure what it is doing as it is running in a binary library with no source available. One thing for sure is that it is using a different shader program, upon discovering this I stored and restored the program handle and this caused the geometry to get rendered again properly but everything is now black! There must be other states being changed.
I was wondering if there is a way to reset Irllicht's assumptions as to the internal state of GLES so that when I do the Irrlicht render pass it sets everything to the correct state. I imagine that this problem won't just occur with the Qualcomm AR middleware but with any system that accesses the same gl context as Irrlicht.
Has anyone had similar problems or know of any solutions?

Cheers,
Mark.
Post Reply