Archived

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

ji yan

Sharing vertex buffer!!!

Recommended Posts

ji yan    122
Hi to all: I have two textures that can be set to be render target, sharing the same vertex buffer and the index buffer with the backsurface. The strange thing is that when I change the shared vertex positions in the buffer for only one texture, my the other texture changed its vertex position as well! I did not use the function DrawIndexPrimitives() to apply the changes to the other texture, how come it automatically did so??? Thanks for any help!!!

Share this post


Link to post
Share on other sites
Terren    122
Make sure you set the texture for your first quad, render it, then set the texture up for your next quad, and render that.

Share this post


Link to post
Share on other sites
afosterw    122
Might be a pointer issue...just a thought.
-Areth

-"Just because I''''m paranoid doesn''''t mean everyone''''s not out to get me."

Share this post


Link to post
Share on other sites
a person    118
DrawIndexedPrimitives() does not apply changes. you should not be reading from vertex buffers anyway. do a lock() all stuff you need unlock() then your drawing. you are only locking once per frame right?

Share this post


Link to post
Share on other sites