Jump to content
  • Advertisement
Sign in to follow this  
Tim Lawton

__vfptr and UpdateSubresource

This topic is 2028 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 currently trying to refactor a piece of code to load an MD5 model, during the render part of the code my UpdateSubresource takes in the first Parameters cbPerObjectBuffer (constant buffer per object buffer). unfortunately  __vfptr seems be holding the wrong/none of the values it should be

 

		deviceContext->UpdateSubresource( cbPerObjectBuffer, 0, NULL, &m_cbPerObj, 0, 0 );

 

 

This is what I get

errorbp.png

 

This is what I should be getting

 

fixg.png

 

Can anyone tell me how to get values for __vfptr?

Share this post


Link to post
Share on other sites
Advertisement
This has nothin to do with vtables; in your first screenshot your cbuffer is an uninitialized variable, with the value of 0xcdcdcdcd.

Share this post


Link to post
Share on other sites

Your "cbPerObjectBuffer" pointer is bogus. Just look at the value: it's 0xcdcdcdcd, which is a scribble pattern used by VC++ to initialize memory allocated from the heap. In other words, you never initialized that pointer.

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!