Jump to content
  • Advertisement

Archived

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

Geronimo2000

C# Mesh Woes

This topic is 5096 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 have successfully created, locked, written to, and unlocked my own vertex buffers. But now, when I try to do the same with the vertex buffers inside of Mesh objects (from Direct3D), I get a System.NotSupported exception when I try to write to the Graphics Stream. Here's some code. I think other people have had similar problems, but I couldn't find any solutions on the boards here. Thanks if you have any ideas. The mesh is the tiger from all the DirectX samples.

CustomVertex.PositionNormalTextured []meshVertices = new CustomVertex.PositionNormalTextured[mesh.NumberVertices];

GraphicsStream meshGS = mesh.VertexBuffer.Lock(0, 0, LockFlags.Discard);


//...manipulate vertices...

			
meshGS.Write(meshVertices);
mesh.VertexBuffer.Unlock();

[edited by - Geronimo2000 on June 10, 2004 2:53:52 AM] [edited by - Geronimo2000 on June 10, 2004 2:54:38 AM] [edited by - Geronimo2000 on June 10, 2004 2:55:27 AM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!