Thread: Rendering primitives in DirectX

  1. #1
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916

    Rendering primitives in DirectX

    There seem to be a few different ways to do it. The first one I learned is this:

    Code:
    //IDirect3DDevice9::CreateVertexBuffer()
    //lock vertex buffer
    //mem copy
    //unlock vertex buffer
    //begin scene
    //SetTransform()s
    //SetStreamSource()
    //DrawPrimitive()
    //end scene
    I understand that pretty well, however, now I'm seeing this in a tutorial, and I'm wondering if there is some advantage/difference with doing it this way. I'm also having a bit of difficulty understanding this second way.

    Code:
    //IDirect3DDevice9::CreateVertexBuffer()
    //SetStreamSource()
    //SetVertexShader()
    //ProcessVertices()
    //begin scene
    //SetTransform()s
    //SetStreamSource()
    //SetVertexShader()
    //DrawPrimitive()
    I think I've probably left something out of that second one or messed something up... but the real question involves SetVertexShader() and ProcessVertices(). I think that is creating a vertex buffer filled with vertices that have already been transformed. Is there any advantage to this? At all? It seems like it would just take up memory. I must be missing something. Can someone clarify it a bit?
    Last edited by confuted; 08-16-2003 at 12:21 PM.
    Away.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 12:17 PM
  2. Isometric Tile Engine using DirectX
    By Wraithan in forum Game Programming
    Replies: 3
    Last Post: 07-17-2006, 12:16 PM
  3. DirectSound header issues
    By dxfoo in forum C++ Programming
    Replies: 0
    Last Post: 03-19-2006, 07:16 PM
  4. scene graph rendering techniques
    By ichijoji in forum Game Programming
    Replies: 7
    Last Post: 03-19-2006, 12:17 AM
  5. DirectX - Starting Guide?
    By Zeusbwr in forum Game Programming
    Replies: 13
    Last Post: 11-25-2004, 12:49 AM