Archived

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

Radan

Rendering Static Geometry

Recommended Posts

I read in an article that Static Vertex buffers are faster for rendering Static geometry(duhhh... hence the name). So I thought to render static geometry like this: Fill ONE Vertex buffer with all the static vertices and render using triangles indexing into that massive VBuffer. But, when rendering with indexed triangles aren''t the vertices supposed to get all processed first and then rendered used when are being indexed. My question is how often will the vertices in that Vertex Buffer get proccessed, cause if all the vertices get proccessed every frame it will be very slow? Sorry if its a beginner question or poorly worded, but I am a bit tired.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
the parameters to DrawIndexedPrimitive control what gets transformed. so if you use 0 for all of them, yes the entire buffer will be transformed, but if you supply the right start index, vertices used etc. then only that part will be transformed

Share this post


Link to post
Share on other sites
It won''t be that slow, don''t worry about it. Try to keep your vertex buffers to a maximum of 4 megabytes so the driver can swap them in and out of video memory as needed.

Share this post


Link to post
Share on other sites
A static VB will probably stay in video memory. Index buffers never do (yet), but once the VB is locked, rendering it is pretty fast, even if it''s big. Vertices don''t get ''processed'' until they''re drawn, so it''s just what you reference in the IB.

I''m not sure what the ''maximum'' size of the static buffer would be before getting shifted down to AGP, but you can test it out.

I like pie.

Share this post


Link to post
Share on other sites
Are u sure that only the vertices that get referenced to get processed cause that would make it very convinient.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Only in software vertex processing the vertices are all transformed before rendering. In hardware vp, only the vertices from the indices are transformed on the fly.

Share this post


Link to post
Share on other sites
Hardware vp is not an option since I''m aiming at older cards (TNT2, Ati Rage).

I guess the next question is what is faster for static geometry, using Static buffers even though some extra vertices get proccessed or using Dynamic VBuffers with a more conservative set of vertices??

Thanks for any replies

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
bump

sorry for bumping an old thread but I''d appriciate more info

Share this post


Link to post
Share on other sites
I think I''m setting the correct values for my DrawIndexedPrimitive function - i get no errors though. But I''m wondering what I should pass as minIndex? Is it the first vertex used by my app or what? I tried to pass the first vertex and I always get "[2500] Direct3D8: (ERROR) :Stream 0 does not have required number of vertices"

Share this post


Link to post
Share on other sites
You would be well served by reading the following:

http://www.tomsdxfaq.blogspot.com/2002_05_01_tomsdxfaq_archive.html#77028718

Share this post


Link to post
Share on other sites