Rendering primitives in DirectX

This is a discussion on Rendering primitives in DirectX within the Game Programming forums, part of the General Programming Boards category; There seem to be a few different ways to do it. The first one I learned is this: Code: //IDirect3DDevice9::CreateVertexBuffer() ...

  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 01: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, 01:17 PM
  2. Isometric Tile Engine using DirectX
    By Wraithan in forum Game Programming
    Replies: 3
    Last Post: 07-17-2006, 01: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21