Jump to content
  • Advertisement
Sign in to follow this  
yurixd

define constants in registers

This topic is 4812 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

Hi! Can anyone help me and explan me why these line of codes give me an error in runtime execution ? hr |= this->direct3DDevice->BeginScene(); D3DXMATRIX compMat; D3DXMatrixMultiply( &mat, &mat, &m_matView); D3DXMatrixMultiply( &mat, &mat, &m_matProj); hr |= m_pVConstantTable->SetMatrix(this->direct3DDevice, "WorldViewProj", &mat); The error is setting the matrix, and is : Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. I will also ask you different methods to link variables defined in my vertex and pixel texture,as float2, float4x4 or textures with my matprojworld, or texture variables in my application code ?? Hope someone can help me! Thanks, Jesus

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by yurixd
hr |= this->direct3DDevice->BeginScene();

D3DXMATRIX compMat;
D3DXMatrixMultiply( &mat, &mat, &m_matView);
D3DXMatrixMultiply( &mat, &mat, &m_matProj);
hr |= m_pVConstantTable->SetMatrix(this->direct3DDevice, "WorldViewProj", &mat);

The error is setting the matrix, and is :

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

It is probably complaining about this: "m_pVConstantTable->".

Share this post


Link to post
Share on other sites
As JohnBolton said, this is a pointer problem, not really a DirectX problem. You need to make sure that the constant table pointer is valid.

When you compile your shader, make sure that no errors are returned and that the constant table pointer is valid. Check the debug spew to see if there were any errors while compiling the shader.

neneboricua

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!