Thread: Can directx draw polys???

  1. #1
    Registered User code2d's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    87

    Can directx draw polys???

    I am wondering if direct x can draw polys? I now that opengl can draw polys but I am not sure about direct X.
    Compiler in use: MinGW

    OS: Windows ME

  2. #2
    Captain - Lover of the C
    Join Date
    May 2005
    Posts
    341
    DrawPrimitive()
    Make the list of points then just use D3DPT_TRIANGLEFAN. It will work for convex polygons.
    Last edited by Brad0407; 04-12-2007 at 02:45 PM.
    Don't quote me on that... ...seriously

  3. #3
    Registered User code2d's Avatar
    Join Date
    Nov 2006
    Location
    Canada
    Posts
    87
    Can direct x draw splines??
    Compiler in use: MinGW

    OS: Windows ME

  4. #4
    Captain - Lover of the C
    Join Date
    May 2005
    Posts
    341
    It's sad that I don't even know what splines are, but I've heard of them so I think so. I don't how you would draw them, but you probably can. Also, were you talking about outlines of polygons or filled polygons? D3DPT_LINESTRIP would draw the outline of any polygon. D3DPT_TRIANGLEFAN would be used to draw filled convex polygons.
    Last edited by Brad0407; 04-12-2007 at 02:45 PM.
    Don't quote me on that... ...seriously

  5. #5
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    A triangle fan can draw convex polygons too.


    Any graphics library can draw any object with enough work on your part... If you're asking whether or not DX has native support for splines, I dunno. OpenGL doesn't.

  6. #6
    Captain - Lover of the C
    Join Date
    May 2005
    Posts
    341
    I meant to say convex. I was tired when I wrote that.
    Don't quote me on that... ...seriously

  7. #7
    vae victus! skorman00's Avatar
    Join Date
    Nov 2003
    Posts
    594
    the D3DX library does have functions for different kinds of splines.

  8. #8
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    ...which are useless unless you truly understand splines and how to optimize them for use in realtime 3D graphics.

    Perspective said it best. Any API can render primitives.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Which is the better way to draw?
    By g4j31a5 in forum Game Programming
    Replies: 16
    Last Post: 01-22-2007, 11:56 PM
  2. DirectSound header issues
    By dxfoo in forum C++ Programming
    Replies: 0
    Last Post: 03-19-2006, 07:16 PM
  3. draw function HELP!!!
    By sunoflight77 in forum C++ Programming
    Replies: 1
    Last Post: 05-10-2005, 11:28 PM
  4. How can I draw a simple JPG or BMP in DirectX 9.0 (C++) ??
    By LegendBreath in forum Windows Programming
    Replies: 6
    Last Post: 04-18-2005, 06:18 AM
  5. ray casting
    By lambs4 in forum Game Programming
    Replies: 62
    Last Post: 01-09-2003, 06:57 PM