XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

Why wont my primitives draw in 3D?

Last post 6/14/2009 9:14 PM by Fronominal. 3 replies.
  • 6/14/2009 6:28 PM

    Why wont my primitives draw in 3D?

    So i have been following primitive examples and can get them to draw in 2D on the screen but i want them to be able to draw in 3D.  I am trying to do a line strip but all the examples use 0 as the z component.  When i change that it doesn't draw I tried using my camera's projection matrix for the basic effect and i cant see the line in 3D.  Any help would be greatly appreciated?
    I Heart Shift available on Xbox Live Marketplace
  • 6/14/2009 7:10 PM In reply to

    Re: Why wont my primitives draw in 3D?

    You're likely not pointing the camera at the line strip, and/or not setting the camera projection correctly. Also, your camera needs to be far enough back from your line strip to actually fit it in the viewport.

    You can check these things out by capturing one frame of data using PIX for Windows, and examining what happens to your data in the Mesh view for your particular draw call.
    Jon Watte, Direct3D MVP
    Tweets, occasionally
    kW X-port 3ds Max .X exporter
    kW Animation source code
  • 6/14/2009 8:59 PM In reply to

    Re: Why wont my primitives draw in 3D?

    Actually i meant line list  Is it ok to use that to render primitives in 3D.  I am pointing the camera at two objects and i am trying to get a line between them to draw.  I am pretty confident my projection is right because i can see two meshes i am rendering.  Is there a specific place i should be doing my rendering of primitives in my draw loop if i want them in 3D.  If anybody could point me too a 3d primitive tutorial that would be good too.
    I Heart Shift available on Xbox Live Marketplace
  • 6/14/2009 9:14 PM In reply to

    Re: Why wont my primitives draw in 3D?

    My Bad Im an idiot you were right i didn't even give it a view matrix.
    I Heart Shift available on Xbox Live Marketplace
Page 1 of 1 (4 items) Previous Next