I have loaded an entity in my Ogre program. Then list Elements in vertexDeclaration like below.
Ogre::VertexDeclaration::VertexElementList lst = vertex_data->vertexDeclaration->getElements();
In the list i have seen VES_POSITION and VES_NORMAL only. Therefor when i run below code,
const Ogre::VertexElement* posElem = vertex_data->vertexDeclaration->findElementBySemantic(Ogre::VES_DIFFUSE);
posElem is contained nothing or null. How to access this kind of element that is not exist? is it possible?then i have added material like below to my entity. This time model loaded successfully with material and diffuse property. but the problem persists. This means that VertexDeclaration does not contain an element with VES_DEFFUSE semantic (only VES_POSITION and VES_NORMAL). Also i loaded some another models, but none of them had such an element with VES_DEFFUSE semantic.
material base_mesh
{
technique
{
pass
{
lighting on
ambient 0.3 0.3 0.3 1
diffuse 0.1 0.7 0.2 1
emissive 0 0 0 1
}
}
}