MDX mesh.drawsubnet and drawprimitive

Started by
3 comments, last by Seiko 17 years, 11 months ago
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,
Advertisement
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]
Richard 'ViLiO' Thomasv.net | Twitter | YouTube
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?

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
Richard 'ViLiO' Thomasv.net | Twitter | YouTube
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

:)

This topic is closed to new replies.

Advertisement