Im trying to create a tetris clone at the moment. but I got problems with rendering the level-mesh.
heres my code:
Code: Select all
// Camera initialization
m_pCamera = g_pIrrSmgr->addCameraSceneNode(NULL, irr::core::vector3df(8.0f, 0.0f, -35.0f),
irr::core::vector3df(8.0f, 0.0f, 0.0f));
// Level initialization
m_pLevelmesh = g_pIrrSmgr->getMesh("Data\\Level.3ds");
m_pLevelnode = g_pIrrSmgr->addAnimatedMeshSceneNode(m_pLevelmesh,NULL,-1,
irr::core::vector3df(0.0f,0.0f,0.0f));
m_pLevelnode->setMaterialTexture(0, g_pIrrDriver->getTexture("Data\\Leveltex.bmp"));
m_pLevelnode->setMaterialFlag(irr::video::EMF_LIGHTING, true);
m_pLightnode = g_pIrrSmgr->addLightSceneNode(0,
irr::core::vector3df(-15,5,-105), irr::video::SColorf(1.0f, 1.0f, 1.0f));
g_pIrrDriver->setAmbientLight(irr::video::SColorf(0.0f,0.3f,0.3f,0.3f));
link
my problem is Im missing some detail.
so thats how it should look like:
link
could anyone tell me what Im doing wrong, please???
and excuse my bad english, please