Trouble with designing graphics output

Started by
0 comments, last by nickwinters 20 years, 2 months ago
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
Advertisement
''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.

-=~''^''~=-.,_Wicked_,.-=~''^''~=-

This topic is closed to new replies.

Advertisement