Jump to content

  • Log In with Google      Sign In   
  • Create Account


__vfptr and UpdateSubresource


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Xooch   Members   -  Reputation: 179

Like
0Likes
Like

Posted 28 March 2013 - 07:07 PM

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?



Sponsor:

#2 Hodgman   Moderators   -  Reputation: 27875

Like
0Likes
Like

Posted 28 March 2013 - 07:57 PM

This has nothin to do with vtables; in your first screenshot your cbuffer is an uninitialized variable, with the value of 0xcdcdcdcd.

#3 MJP   Moderators   -  Reputation: 10264

Like
0Likes
Like

Posted 28 March 2013 - 07:59 PM

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.



#4 Xooch   Members   -  Reputation: 179

Like
0Likes
Like

Posted 28 March 2013 - 08:24 PM

Thanks guys! Still a little new to this, but got it working now






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS