Archived

This topic is now archived and is closed to further replies.

Trouble with designing graphics output

This topic is 5042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The initial design of the program I''m writing is that the user can use an add function that passes an array of vertices, and and array of ints which will be put into an index buffer. All the code works fine, until I notices these two lines in sample code: device.SetStreamSource(0, vb, 0); device.indeces=ib; Does this mean every time I paint the screen, I can only have one vertex buffer, and one index buffer? Or is there a way where I can create a new vertex and index buffer everytime my add function is called, and they''ll all be drawn when paint is called? Thanks. -Nick

Share this post


Link to post
Share on other sites
''basically'' you get one vb to use at a time although you can have another stream that your vshader might use. Just create the VBs ahead of time and during rendering, loop through them, setting the device''s stream to each, render, repeat.

Share this post


Link to post
Share on other sites