• Advertisement

Archived

This topic is now archived and is closed to further replies.

Passing Address of Index/Vertex buffer

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

O.k right now i have an index and vertex buffer that is private data in a class.... I am attempting to pass the address of this structure out of the class so i can temporarily scan through the data to test for mouse selection using this simple code
  
LPDIRECT3DVERTEXBUFFER8* Square::ReturnVertexData()
{
	return &VertexData;
}
  
then i use a variable in the calling function defined as this
  
LPDIRECT3DVERTEXBUFFER8 *VertexBuf;
VertexBuf=PickObject.ReturnVertexData();
  
the problem seems to appear when i want to unlock,lock or release these objects
  
VertexBuf->Lock( 0,0,(BYTE**)&pVertices, 0 );
  
the compiler says "left of '->Lock' must point to class/struct/union" which usually means I dont have the correct level of indirection associated with the variable my main question is How do i get around this? any ideas would be appreciated...this is starting to drive me crazy! Thanks for any help Mark Edited by - MarkO on September 21, 2001 8:55:34 PM

Share this post


Link to post
Share on other sites
Advertisement
Just goes to show what staring at a screen for too long will do
That seems to have cleared the problem up..at least no errors or crashes yet
Anyways I had tried something similiar earlier with one of my more complex objects and i got a major crash windows exception which usually happens when i overun memory I am not supposed to be in
Thanks for the help

Share this post


Link to post
Share on other sites

  • Advertisement