Draw without to use lock

Hi,
I would like to know, if it's possible to draw 3D graphics in DirectX without use locking vertices (IDirect3DVertexBuffer9::Lock)
I know, it's possible with Opengl .

Thanks for your help



Answer this question

Draw without to use lock

  • Steve from adzac

    okey dokey
    thanks a lot for your answers

  • Simon Heffer

    A good way to do it is to have a big vertex buffer that you grow only on demand. Then you can add/remove vertices from that buffer without having to recreate it every time. As for the cost of locking/unlocking. It's not that much. For a modeling app, I'd certainly use vertex buffers and deal with them as usual (lock, update, unlock) on demand...


  • Ben Vanik

    I hope to create a 3D modeler, so I have to alter/add vertex often.
    Are there other systems to do it

    thanks for your answer

  • Strawberry Pancakes

    Yes, you can draw with DrawPrimitiveUP() or DrawIndexedPrimitiveUP(). But these are not the best in terms of performance, so don't call them too much...


  • Draw without to use lock