Extending IMaterialRenderer

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
swatter555
Posts: 14
Joined: Wed Sep 27, 2006 1:30 am

Extending IMaterialRenderer

Post by swatter555 »

I am attempting to blend three textures together on my TerrainScene node. I am wanting to accomplish something like this:

// Landmasses
eg::terrain->setMaterialFlag(video::EMF_LIGHTING, false);
eg::terrain->setMaterialTexture(0,eg::gRes->terrain01);

// Detail for landmasses
eg::terrain->setMaterialTexture(1,eg::gRes->detail01);
eg::terrain->setMaterialType(video::EMT_DETAIL_MAP);
eg::terrain->scaleTexture(1.0f,5.0f);

// Ocean texture to cover the funky looking water of
// the results first two textures.
eg::terrain->setMaterialTexture(2,eg::gRes->terrain02);
eg::terrain->setMaterialType(video::EMT_SOLID_3_LAYER);


I have been looking through the source code and have located different classes that handle texture blending, but I cannot see how all of this connects together in the engine. And if I dig down deeper I see that the texture blending is broken down by graphics driver. I also cannot find the source file associated with "IMaterialRenderer.h", that would answer some questions.

Could someone give me some hints or maybe tell me how they would go about extending the IMaterialRenderer.
Post Reply