• 10
• 9
• 13
• 10
• 18

# [OGRE] manualobject vs stencil shadows

This topic is 2933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi, this is an ogre project :) I'm trying to have a manualobject cast stencil shadows. the manual states that if you want this, you have to define the indices and I have done that :) now the problem is that the shadows aren't working at they should :( the shadows are totaly wrong and whenever I move the camera, the are following me (they look like some kind of overlay). some code about what I do :
ManualObject* manual = mSceneMgr->createManualObject("manual");
manual->begin("CubeMTL", RenderOperation::OT_TRIANGLE_LIST );
std::vector<OBJTriangle>::iterator it = TriangleList.begin();
int ind = 0;
for (;it!=TriangleList.end();++it)
{
OBJTriangle current = (*it);
for (int i = 0;i<3;++i)
{
manual->position(current.vert.x,current.vert.y,current.vert.z);
manual->normal(current.norm.x,current.norm.y,current.norm.z);
manual->textureCoord(current.UV.u,current.UV.v);
int blabla = ind*3 + i;
manual->index(blabla);
}
ind++;
}
manual->end();
mm->attachObject(manual);