Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Need help with DX9 Mesh class (.NET)

jjerryjjerry Member Posts: 4

How am I supposed to render a mesh created by something like
Mesh.Sphere(), Mesh.Torus()? I tried setting it up by telling
the Device that we'll use mesh's vertex & index buffers by
Device.SetStreamSource and Device.Indices but I get nothing
when I try to render it with Device.DrawIndexedPrimitives.
Why could that be? I also tried creating an attribute table for
the Mesh.DrawSubset() method which consisted of only one element
covering all the vertex/index data but that failed as well :(

One more question: when setting the projection transform of
the device I usually use Matrix.PerspectiveFovLH() method.
I provide the FOV and the aspect ratio but I'm not sure about
the clipping planes. Should I provide the Z-values of the clipping
planes in camera (view) space and are these absolute values or
relative to something, or conventional like - 0.0f is the camera,
1.0f is infinity or some other s..

Thanks :)

Comments

  • CroWCroW Member Posts: 348
    :
    : How am I supposed to render a mesh created by something like
    : Mesh.Sphere(), Mesh.Torus()? I tried setting it up by telling
    : the Device that we'll use mesh's vertex & index buffers by
    : Device.SetStreamSource and Device.Indices but I get nothing
    : when I try to render it with Device.DrawIndexedPrimitives.
    : Why could that be? I also tried creating an attribute table for
    : the Mesh.DrawSubset() method which consisted of only one element
    : covering all the vertex/index data but that failed as well :(
    :
    : One more question: when setting the projection transform of
    : the device I usually use Matrix.PerspectiveFovLH() method.
    : I provide the FOV and the aspect ratio but I'm not sure about
    : the clipping planes. Should I provide the Z-values of the clipping
    : planes in camera (view) space and are these absolute values or
    : relative to something, or conventional like - 0.0f is the camera,
    : 1.0f is infinity or some other s..
    :
    : Thanks :)
    :

    i usually take a near plane of 1.0f and a far one of 1000.0f or something like that.these values describe the distance from screen to the rendered object.dont forget to setup the camera to the right direction/position and disable backface-culling (for testing).

Sign In or Register to comment.