MFC Rend No Texture

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.

MFC Rend No Texture

Postby update44 » Tue Jan 17, 2012 1:28 pm

I use mfc projtect,but the code cant set texture,the model always black.

scene::IAnimatedMesh* mesh =m_smgr->getMesh("media/sydney.md2");
if (mesh)
{
scene::IAnimatedMeshSceneNode* node = m_smgr->addAnimatedMeshSceneNode( mesh );
node->setCurrentFrame(2);
if (node)
{
node->setMaterialFlag(video::EMF_LIGHTING, true);
node->setMD2Animation(scene::EMAT_STAND);
node->setMaterialTexture( 0, m_driver->getTexture("media/sydney.bmp") );
node->setPosition(core::vector3df(0,0,10));
}
}
Last edited by update44 on Tue Jan 17, 2012 1:42 pm, edited 1 time in total.
update44
 
Posts: 3
Joined: Tue Jan 17, 2012 3:02 am

Re: MFC Rend No Texture

Postby CuteAlien » Tue Jan 17, 2012 1:34 pm

That just makes no sense... do you have a question? (Note: my browser does not display most of the text in your first line - you probably use some other font like chinese or so there).
IRC: #irrlicht on irc.freenode.net
My patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Games with Irrlicht: http://www.irrgheist.com/
News: http://www.reddit.com/r/irrlicht/
User avatar
CuteAlien
Admin
 
Posts: 5364
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: MFC Rend No Texture

Postby update44 » Tue Jan 17, 2012 1:43 pm

CuteAlien wrote:That just makes no sense... do you have a question? (Note: my browser does not display most of the text in your first line - you probably use some other font like chinese or so there).



thanks!
update44
 
Posts: 3
Joined: Tue Jan 17, 2012 3:02 am

Re: MFC Rend No Texture

Postby smso » Tue Jan 17, 2012 1:45 pm

no light, no color

cpp Code: Select all
node->setMaterialFlag(video::EMF_LIGHTING, false);
smso
 
Posts: 218
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: MFC Rend No Texture

Postby update44 » Tue Jan 17, 2012 1:46 pm

smso wrote:no light, no color

cpp Code: Select all
node->setMaterialFlag(video::EMF_LIGHTING, false);



yes,you are right!
update44
 
Posts: 3
Joined: Tue Jan 17, 2012 3:02 am


Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest