Blending in Irrlicht without using nodes and drawAll

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
jcarew
Posts: 34
Joined: Wed Jul 04, 2007 3:54 pm

Blending in Irrlicht without using nodes and drawAll

Post by jcarew »

Hi. How can I turn on blending example Alpha Blending for rendering my meshes? I have problem with blending by native DX API, so meybe I can use Irrlicht API for blending? In simple code, after "need function" I put similar OpenGL function. Simple code:

Code: Select all

// How can I enable blending? It's default turn on? In OpenGL -> glEnable ( GL_BLEND);
for (u32 buffer=0; buffer < m->getMeshBufferCount(); ++buffer)
{
// How can I set blending function? In OpenGL -> glBlendFunc(GL_ONE, GL_ONE);
Driver->setMaterial(Mat);
Driver->drawMeshBuffer(m->getMeshBuffer(buffer));
}
// How can I disable blending? It's default turn on? In OpenGL -> glDisable ( GL_BLEND);
Please help me:) I need blending without using Nodes (draw meshes only per drawMeshBuffer) and SceneManager->drawAll(); etc.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Why aren't you using nodes or drawAll?

You just set up the properties of the material. Check the API to see how to set the various parameters of it
Image Image Image
Post Reply