Hi all,
I can't really understand why my non-textured meshes are always rendered with a white diffuse colour.
I turned off ambient, emissive etc.. and if I use OpenGL or Software, all meshes are rendered with their right diffuse color.
This happens only with Direct3D 8 and 9.
I'm using an ATI 1400 with the last drivers...
Thanks for any help!
Direct3D & diffuse color material
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
What version of Irrlicht are you using? And can you provide us with some sample source that would allow us to replicate the problem?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 8
- Joined: Tue Jan 27, 2009 9:30 am
I'm using Irrlicht 1.5 Win32 compiled version and I'm now downloading the latest SVN sources.
An example code:
If I use OpenGL or Software the sphere is rendered correctly with a red colour while with DirectX 8 or 9 the sphere is always white despite of diffuse colour material.
Thanks again for your help.
An example code:
Code: Select all
// start up the engine
IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9,
core::dimension2d<s32>(640,480));
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* scenemgr = device->getSceneManager();
// add a first person shooter style user controlled camera
scene::ICameraSceneNode * cam = scenemgr->addCameraSceneNodeFPS();
cam->setPosition(core::vector3df(0,0,-30));
scene::ISceneNode * sphere = scenemgr->addSphereSceneNode();
//-----------------
sphere->getMaterial(0).AmbientColor = 0;
sphere->getMaterial(0).DiffuseColor = video::SColor(255,255,0,0);
//-----------------
scene::ILightSceneNode *il = scenemgr->addLightSceneNode(0,core::vector3df(0,10,-80));
il->setRadius(100);
// draw everything
while(device->run() && driver)
{
driver->beginScene(true, true, video::SColor(255,0,0,255));
scenemgr->drawAll();
driver->endScene();
}
// delete device
device->drop();
Thanks again for your help.
-
- Posts: 8
- Joined: Tue Jan 27, 2009 9:30 am