Vertex Buffers and Updates/culling

Started by
4 comments, last by ET3D 15 years, 11 months ago
So I have allocated vert buffers for my geometry...i have a question. I don't want to have to rebuild my vertbuffer every time i move the camera and geometry is culled/unculled....How do i go about keeping everything on the card and only drawing what is necessary? Is it faster to put all the geometry on the card in a VB and make lots of draw calls with offsets into vb...orr is it faster to re-organize the VB every frame because the camera has moved and i need to render more stuff? Thanks!
Advertisement
Quote:Original post by nex7
Is it faster to put all the geometry on the card in a VB and make lots of draw calls with offsets into vb...orr


This is probably the way to go. You'll have to strike a balance between reducing draw calls and reducing the amount of vertices you send to the GPU. In general you'll probably want to lean towards less draw calls, at least if your vertex shader is relatively cheap.

thanks ill give that a shot
This would mean a draw call per object though....because i cant do a


draw verts 1-40, 53-64 and 128-178
Along the same line...if i have 50,000 billboarded quads on screen and i have to update their positions then refill the vertexbuffer to be drawn....

having to update 300000 verts...then pack vertexbuffers up and draw as i go....


i mean whats the best way to go about doing this sort of thing...i feel like im just doing way too much work.
You don't need 6 vertices per quad. You can do 4 if you use indices, one if point sprites are applicable, and also 1 if you use instancing (you'd have 4 fixed vertices plus instance data).

This topic is closed to new replies.

Advertisement