for( DWORD i=0; i<m_dwNumMaterials; i++ )
{
*m_pMeshMaterials.Diffuse.r = r;
*m_pMeshMaterials.Diffuse.g = g;
*m_pMeshMaterials.Diffuse.b = b;
}
Changing Materials Values ( error C2100: illegal indirection )
Hi All!
Making a game where you can change the colour of a mesh dynamically. Each mesh has a single material so i thought it would be no problem changing the colours all i would have to do was something like this:
However as the title of this post suggests its not that simple, i have been getting "error C2100: illegal indirection" errors.
Any ideas why im getting this? Im sorry if this is abit of a nooby question as i have only been C++ programming a few weeks ;)
Cheers
Mike
I guess m_pMeshMaterials is a pointer. So why do you derefence the element indexed with ? Just remove the '*'s.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement