RobyDx Posted March 28, 2004 Posted March 28, 2004 I have 2 problems: 1)I want to draw cubic bezier rectangular patch. When I draw 1 path I put vertex from left to right and up to down to create a 4 x 4 group (an array of 16 vertex). How I must order then if for example I want to create a plane of 4 x 4 patch? 2)How work patch mesh? I create one, I use tessellate applied to the normal mesh and in present it give me an error if I draw the mesh that I tessellate. patchMesh.Tessellate(4, normalMesh) normalMesh.DrawSubset(i) Initialitation code is this Dim paInfo As New PatchInformation paInfo.BasisType = BasisType.BSpline paInfo.PatchType = PatchType.Rectangle paInfo.Degree = DegreeType.Cubic paInfo.TessellateLevel = New Single() {3, 3, 3, 3} Dim elementi() As VertexElement = {New VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0), New VertexElement(0, 12, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Normal, 0), New VertexElement(0, 24, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0), VertexElement.VertexDeclarationEnd} PatchMesh = New PatchMesh(device, paInfo, 4, normalMesh.NumberVertices, elementi) How it works patchMesh? Anyone can help me or give me a website that cover also in C++ this topic? Quote Come to visit
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.