Hi,
I'm passing an object of my class to a function as a pointer.
When I try to access and change one of the members of the passed object, I get access violations.
Am I overseeing something?
The code:
bool CD3d::LoadScene(CScene *pScene, CD3dscene *pD3dscene, CD3dcam *pCam)
{
pScene->mEffectFilenames[0] += ShaderSelectOptimalGeneric(pD3dscene, &nrdirlights, &nrpointlights);
pD3dscene->mShaders[0].SetLightCount(0, 1); //nrdirlights, nrpointlights);
}
On the 2nd line it goes wrong.
Looks like within the function I'm only allowed to read from the passed object, even though I'm using a pointer to the object
(I've checked through debugging that mShaders[0] exists and is valid)






