Jump to content
  • Advertisement
Sign in to follow this  
Timptation

Odd crash, need ideas (SOLVED)

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm crashing on the 17th run of a Effect->Begin(&numPasses, 0) call. The debug info I'm seeing in the console mentions assertion failures like "m_cDirtyVariables == 0", "m_cDirtyVariables < m_cVariablesOrig", "piBlockAssignments[iBlockAssn] < pBlock->m_cAssignments", and "pSubBlock < m_pAllBlocks + m_cBlocks". Does anyone know what i might be doing wrong? Here's a code snippet involving drawing my effect file (I know there's a way to format this if anyone cares to clue me in): device->SetVertexShader(0); device->SetPixelShader(0); D3DXMatrixScaling(&matScale, 3.0f, 4.0f, 3.0f); D3DXMatrixTranslation(&matTranslate, -3.0f, g_Terrain.getHeightAt(-3.0f, -6.0f), -6.0f); matFinalTransform = matScale * matTranslate; g_pDwarfEffect->SetMatrix(g_DEWorldMatrixHandle, &matFinalTransform); g_Camera.getViewMatrix(&m); matFinalTransform = matFinalTransform * m *g_ProjMatrix; g_pDwarfEffect->SetMatrix(g_DEViewProjMatrixHandle, &matFinalTransform); device->SetVertexDeclaration(g_vertDecl);// Can this be done in effect file? FVF can. g_pDwarfEffect->SetTechnique(g_DETechnique0); unsigned int numPasses = 0; g_pDwarfEffect->Begin(&numPasses, 0); for(int i = 0; i < numPasses; i++) { g_pDwarfEffect->BeginPass(i); for(unsigned int j = 0; j < g_DwarfMaterials.size(); j++) { g_pDwarfEffect->SetVector( g_DEAmbientMtrlHandle, (D3DXVECTOR4*)(&g_DwarfMaterials[j].Ambient) ); g_pDwarfEffect->SetVector( g_DEDiffuseMtrlHandle, (D3DXVECTOR4*)(&g_DwarfMaterials[j].Diffuse) ); g_pDwarfEffect->SetTexture(g_DETextureHandle, g_DwarfTextures[j]); g_pDwarfMesh->DrawSubset(j); } } g_pDwarfEffect->End();

Share this post


Link to post
Share on other sites
Advertisement
Nevermind. I guess my book is too old. Apparently you only had to call effect->pass() then, and now its effect->beginpass() and effect->endpass().

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!