Page 1 of 1
EMT_TRANSPARENT_VERTEX_ALPHA in OpenGL?
Posted: Tue Jul 18, 2006 1:04 am
by agrif
Looking at the documentation, it seems most materials like EMT_TRANSPARENT_VERTEX_ALPHA don't work in OpenGL, although it doesn't say whether EMT_TRANSPARENT_VERTEX_ALPHA works. I tried using this material with the following code, but nothing at all happens...
Code: Select all
mesh = smgr->getMesh("../media/intro/displaygreendots.x");
node = smgr->addAnimatedMeshSceneNode(mesh);
if (node)
{
node->setMaterialFlag(irr::video::EMF_LIGHTING, false);
node->setMaterialType(irr::video::EMT_TRANSPARENT_VERTEX_ALPHA);
mm->setVertexColorAlpha(mesh->getMesh(0), 50);
}
I have no way of testing if this works with direct3d (pure linux ftw!
)
Posted: Thu Jul 20, 2006 12:36 am
by agrif
I'm normally not one to bump topics, so forgive me... but with 3 days but only about 18 views (at least 4 mine
), maybe this is worth another try.
I'm beginning to think this is an Advanced Help topic...
Posted: Thu Jul 20, 2006 1:12 pm
by hybrid
Yes, seems to be a problem with vertex alpha, at least the world in example 11 is not transparent (anymore?)
Posted: Thu Jul 20, 2006 1:27 pm
by sh1ny
Works kinda strange here
using irrlicht 1.0 with irrlicht.NET CP from deusXL :
opengl :
D3D9 :
D3D8 :
Maybe is something im doing wrong, or it's how is supposed to be ?
Posted: Fri Jul 21, 2006 10:49 am
by Spintz
It's a bug with the render states in OpenGL. The OpenGL Driver does not properly manage rendering states.
Posted: Fri Jul 21, 2006 5:11 pm
by agrif
I looked through all the examples for some sample code that would work, but apparently I forgot about the planet in the PerPixelLighting demo... It works on my computer, so I worked off that.
I found out that
EMT_TRANSPARENT_VERTEX_ALPHA does not work no matter how you jigger it in OpenGL. However,
EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA will work for ~1 mesh for the entire scene. I couldn't figure out exactly what set this mesh apart, every time I changed the code a bit it changed randomly.
It's a bug with the render states in OpenGL. The OpenGL Driver does not properly manage rendering states.
I don't know much about OpenGL, but that sounds like that could cause these weird magic errors...
Anybody know if there's a chance for these to be fixed soon? (or maybe if the svn has this fixed?)