Re-Loading The Buffer After Initialization RRS feed

  • Question

  • I have a model that ultimately renders a triangle list. The initial rendering works fine, however, I was wondering - if I want to adjust the triangle position, what is the correct approach to do it, so that I can clear the device buffer, set the new vertex and index buffers and the re-render?

    Basically, my model class has an Initialize method, that creates the rectangles. Once completed, I call device->CreateBuffer for both vertex and index buffers. After that, I am rendering the content in a RenderBuffers method, with:




    Friday, June 8, 2012 8:56 PM

All replies

  • Why not create two buffer first?


    Monday, June 11, 2012 11:18 AM
  • Hello ddelimarsky,

    Are you still having problems with this or do you have what you need? If you still need help please let me know and I will do what I can to help you.



    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Saturday, June 16, 2012 12:27 AM
  • Out of curiosity, what would be the right way to have two swappable buffers in this case, that can be easily integrated in an existing swap chain?

    Monday, June 18, 2012 3:03 PM