Irrlicht GLES2 has no texture on android

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
n00bc0de
Posts: 133
Joined: Tue Oct 04, 2022 1:21 am

Irrlicht GLES2 has no texture on android

Post by n00bc0de »

I got irrlicht to build on android with my custom SDL2 device. Everything builds and runs fine but when I try to set a texture on a scene node it just renders the mesh all black.

I have disabled lighting on the material so that is not the issue. I am not sure where to look since I am not getting any errors in logcat on Android studio. Also, I drew the texture on the screen to make sure the texture loaded and it does render correctly. Any suggestions on where to look would be appreciated.
CuteAlien
Admin
Posts: 10021
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht GLES2 has no texture on android

Post by CuteAlien »

You can try adding some testGLError calls in the OGLES2Driver. If there are any... you have to work backwards - adding tests earlier and earlier until you figure out where they come from (often you have to add them in other classes like the texture class etc).

If there are no GL errors things get more tricky. You could try using simpler scene - like just a cube without textures - to check if other materials show up.
And not sure which code you try to run - is it the hello world example?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
n00bc0de
Posts: 133
Joined: Tue Oct 04, 2022 1:21 am

Re: Irrlicht GLES2 has no texture on android

Post by n00bc0de »

Thanks for the feedback. I managed to find the issue.

I managed to fix the issue by adding this line:

Code: Select all

node->setMaterialFlag(irr::video::EMF_USE_MIP_MAPS, false);
Post Reply