Sign in to follow this  
Seiko

MDX mesh.drawsubnet and drawprimitive

Recommended Posts

I'm trying to render a simple scene using both a mesh.drawsubset call and a draw primitive call. Unfortunately if I try to make both calls between a start and end render scene I loose my drawprimitive output? I thought it must be the transform.world changing between the two styles of rendering calls but if I leave all code and comment just the mesh.drawsubset the drawprimitive call works fine. I'm not using anything fancy, I've reduced all complexity, turning lighting off etc and again if I make either one of the calls the output is ok? It's been awhile since I last programmed using D3D so I may be missing something obvious, can someone suggest a few things it might be? Thanks inadvance,

Share this post


Link to post
Share on other sites
Are you making sure to specify the Device.VertexFormat when drawing the primitive?

You could also trying turning your Device.RenderState.CullMode to Cull.None.

Regards,
ViLiO

[Edited by - ViLiO on May 18, 2006 1:48:51 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by ViLiO
Are you making sure to specify the Device.VertexFormat when drawing the primitive?

Regards,
ViLiO


Thanks, you might be on to something as I've just tried reseting the vertxtformat each time before I make the drawprimitive calls and I now get to see that output. Alas, I've now lost the mesh output so I guess I need to set the VertexFormat to something compatible with the mesh structure before making that call?

Share this post


Link to post
Share on other sites
Quote:
Original post by Seiko
Quote:
Original post by ViLiO
Are you making sure to specify the Device.VertexFormat when drawing the primitive?

Regards,
ViLiO


Thanks, you might be on to something as I've just tried reseting the vertxtformat each time before I make the drawprimitive calls and I now get to see that output. Alas, I've now lost the mesh output so I guess I need to set the VertexFormat to something compatible with the mesh structure before making that call?

mesh.Drawsubset won't set the VertexFormat for you, so yea you will have to call device.VertexFormat = mesh.VertexFormat; before rendering the mesh too.

All the best,
ViLiO

Share this post


Link to post
Share on other sites
Quote:
Original post by ViLiO
Quote:
Original post by Seiko
Quote:
Original post by ViLiO
Are you making sure to specify the Device.VertexFormat when drawing the primitive?

Regards,
ViLiO


Thanks, you might be on to something as I've just tried reseting the vertxtformat each time before I make the drawprimitive calls and I now get to see that output. Alas, I've now lost the mesh output so I guess I need to set the VertexFormat to something compatible with the mesh structure before making that call?

mesh.Drawsubset won't set the VertexFormat for you, so yea you will have to call device.VertexFormat = mesh.VertexFormat; before rendering the mesh too.

All the best,
ViLiO


Thankyou

:)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this