[fixed]Ogles: TRANSPARENT_ALPHA_CHANNEL_REF Material colors

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
porcus
Posts: 149
Joined: Sun May 27, 2007 6:24 pm
Location: Germany

[fixed]Ogles: TRANSPARENT_ALPHA_CHANNEL_REF Material colors

Post by porcus »

Hi,

I noticed that with EMT_TRANSPARENT_ALPHA_CHANNEL_REF the colors in the SMaterial are ignored.
This can be fixed by replacing:

Code: Select all

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
with:

Code: Select all

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
in the COGLESMaterialRenderer.h
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Ogles/Android: TRANSPARENT_ALPHA_CHANNEL_REF Material co

Post by CuteAlien »

Hm, I think that's the way the materials is supposed to work. It either uses colors or textures - no combination. At least I think that's the way it also works on other platforms.
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
porcus
Posts: 149
Joined: Sun May 27, 2007 6:24 pm
Location: Germany

Re: Ogles/Android: TRANSPARENT_ALPHA_CHANNEL_REF Material co

Post by porcus »

I don't think so.
The OpenGL driver uses also textures and colors.
This makes also sense because if you don't want to use colors, just use white and you can get the same behaviour than without colors.
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Ogles/Android: TRANSPARENT_ALPHA_CHANNEL_REF Material co

Post by CuteAlien »

You are right. This got changed in the OpenGLMaterialRenderer after the OLG-ES branch got split off and hadn't been merged. My fault. Thanks for reporting - it's fixed in r4716. I've also added the other change for a LIGHTMAP material which was done at the same time in trunk.
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
Post Reply