Irrlicht Android specific device issue
Irrlicht Android specific device issue
Have issue connected with specific device.
Have error log.
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
Have error log.
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
Re: Irrlicht Android specific device issue
I have the same issue, Do you know how to solve ?
Re: Irrlicht Android specific device issue
I can't solve it.
Samsung Ace, Android 2.2
The error is raised in COGLES1MaterialRenderer_SOLID::OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services).
Stack trace looks like COGLES1Driver -> genericDriverInit -> setRenderStates3DMode -> OnSetMaterial.
I stuck on OnSetMaterial code, especially this lines:
If you have any info about Murphy or "some bugs", please help.
After commenting glTexEnvi , I can see textures, but only if they are close to camera.
Sorry for my English.
Thanks for any help.
Samsung Ace, Android 2.2
The error is raised in COGLES1MaterialRenderer_SOLID::OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services).
Stack trace looks like COGLES1Driver -> genericDriverInit -> setRenderStates3DMode -> OnSetMaterial.
I stuck on OnSetMaterial code, especially this lines:
Code: Select all
if (resetAllRenderstates || (material.MaterialType != lastMaterial.MaterialType))
{
// thanks to Murphy, the following line removed some
// bugs with several OGLES1 implementations.
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
}
If you have any info about Murphy or "some bugs", please help.
After commenting glTexEnvi , I can see textures, but only if they are close to camera.
Sorry for my English.
Thanks for any help.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Irrlicht Android specific device issue
The comment is wrong, it read OpenGL at the time it was written. Don't know how this was replaced this wrong. It should be removed anyway. It somehow sounds as if you have problems with vertex colors, because once you remove the modulate you might get straight texturing instead of vertex color modulation. Maybe try your scene with one of the standard renderers first. Maybe some lighting issues also, or some other scene problem
Re: Irrlicht Android specific device issue
@hybrid: Thanks for response.
Another code that raise GL_INVALID_ENUM is in COGLESDriver::setBasicRenderStates:
According to http://www.khronos.org/opengles/documen ... meter.html , glTexParameterf hasn't GL_TEXTURE_MAX_ANISOTROPY_EXT parameter name.
Maybe I should look into other documentation?
Another code that raise GL_INVALID_ENUM is in COGLESDriver::setBasicRenderStates:
Code: Select all
#ifdef GL_EXT_texture_filter_anisotropic
if (FeatureAvailable[IRR_EXT_texture_filter_anisotropic])
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT,
static_cast<GLfloat>(material.TextureLayer[i].AnisotropicFilter>1 ? core::min_(MaxAnisotropy, material.TextureLayer[i].AnisotropicFilter) : 1));
#endif
Maybe I should look into other documentation?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Irrlicht Android specific device issue
Well, this one should only be enabled if the headers support the extension. Hence the ifdef and the FeatureAvailable check. So if the headers support the ext extension, and also the runtime says it does, there's quite some chance that it's for sure supported.
Re: Irrlicht Android specific device issue
Samsung ACE assures that he supports anisotropic filter on runtime.
But when I do #undef GL_EXT_texture_filter_anisotropic, all GL_INVALID_ENUM errors disappeared.
Second step is dirty monkey patch.
I changed code in OnSetMaterial from
to
And it works!
Code is tested only on Samsung Ace, can some one test this solution on other phones, please?
@hybrid, can you give me some clue about how resetAllRenderstates used on createDevice step?
But when I do #undef GL_EXT_texture_filter_anisotropic, all GL_INVALID_ENUM errors disappeared.
Second step is dirty monkey patch.
I changed code in OnSetMaterial from
Code: Select all
if (resetAllRenderstates || (material.MaterialType != lastMaterial.MaterialType))
{
// thanks to Murphy, the following line removed some
// bugs with several OGLES1 implementations.
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
}
to
Code: Select all
if (material.MaterialType != lastMaterial.MaterialType)
{
// thanks to Murphy, the following line removed some
// bugs with several OGLES1 implementations.
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
}
Code is tested only on Samsung Ace, can some one test this solution on other phones, please?
@hybrid, can you give me some clue about how resetAllRenderstates used on createDevice step?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Irrlicht Android specific device issue
Maybe we have some missing texture setup there for an unknown reason. This could lead to in invalid enum maybe. Or do you have just one scene node and material in your scene for now?
Maybe the EXT extension is not right for the filter there. Problem is that many drivers and emulators have really badly written extensions sometimes. I'd have to go through all the extension definitions once more, but IIRC, I did this for the filter things already. So maybe more likely not a problem with Irrlicht.
Maybe the EXT extension is not right for the filter there. Problem is that many drivers and emulators have really badly written extensions sometimes. I'd have to go through all the extension definitions once more, but IIRC, I did this for the filter things already. So maybe more likely not a problem with Irrlicht.
Re: Irrlicht Android specific device issue
My scene has 3 nodes/materials.
This isn't problem with Irrlicht, as topic starter mentioned before, this is specific Android device problem - Samsugn Ace.
This isn't problem with Irrlicht, as topic starter mentioned before, this is specific Android device problem - Samsugn Ace.
Re: Irrlicht Android specific device issue
Old topic, but I run into the same problem on Moto G. The one with the glTexParameterf call failing for GL_TEXTURE_MAX_ANISOTROPY_EXT with GL_INVALID_ENUM. I had seen a GL_INVALID_ENUM on startup for a while already so started to debug around a while tonight until I found it as well. Only happens in ES1.0, while same call works in ES2.0. After which I googled... to get this thread as result. Irrlicht forum knows it all ;-)
The device reported that it supports GL_EXT_texture_filter_anisotropic, so I also guess it's a vendor bug. My other device does not support that extension at all (and correspondingly not getting errors there).
The device reported that it supports GL_EXT_texture_filter_anisotropic, so I also guess it's a vendor bug. My other device does not support that extension at all (and correspondingly not getting errors there).
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Irrlicht Android specific device issue
The reason is that now, in this day and age ES 1.1 is "compatibility profile"-like and its not top priority or in-fact any priority at all for driver developers, a move to ES 2.0 or better ES 3.0 would solve your problems.Only happens in ES1.0, while same call works in ES2.0. After which I googled... to get this thread as result. Irrlicht forum knows it all
The device reported that it supports GL_EXT_texture_filter_anisotropic, so I also guess it's a vendor bug. My other device does not support that extension at all (and correspondingly not getting errors there).
Re: Irrlicht Android specific device issue
Hehe thread revived once more ;-) And yeah - we also just keep ES 1.1 around because there had never been a release with it in Irrlicht and as long as it doesn't make troubles we will keep it for 1.9, but marked as deprecated. If it causes any troubles it will be kicked out. Not that Android devices with ES 2.0 cause any less troubles - drivers are sometimes just as bad on some devices (but that's just Android as usual).
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm