Jump to content
  • Advertisement

Archived

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

SporadicFire

Indices of static geometry

This topic is 5803 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

Is it of any significant advantage to put indices of static geometry within NVidia vertex array range? I am already using it for vertex data. Any other tips on optimal use of NVidia vertex arrays?

Share this post


Link to post
Share on other sites
Advertisement
quote:

Is it of any significant advantage to put indices of static geometry within NVidia vertex array range?


No. In fact, it will tremendeously slow down your program. On nVidia hardware, indices are always streamed by the CPU (although that might change with the GF-5). So the CPU would read them from AGP or VRAM (very slow), process them a little and stream them back to the 3D card. Very inefficient.

Just put all vertex data into the VAR (coordinates, colours, texcoords, normals, your own user attributes if you use vertex shaders, etc). The indices should stay in normal system RAM.

Things are different on ATI Radeon hardware. It ssupports hardware index arrays, and this functionality is exposed in the VAO extension.

/ Yann

Share this post


Link to post
Share on other sites
ok...thanks...another question. I cant get wglAllocMem to allocate VRAM (i have a GeForce2MX). It always gives a NULL pointer...any suggestions?

Share this post


Link to post
Share on other sites
You mean wglAllocateMemoryNV() ?

What parameters do you use for the call (the 3 floating point ones) ? It shouldn't be a problem to get VRAM on a GF2MX. Do you have the latest drivers ?

Oh: how much are you trying to allocate, and how much VRAM does your MX have ? Keep in mind that VRAM is used for the framebuffer, the textures, display lists, etc. So there might not be enough left to satisfy your allocation request.

/ Yann

[edited by - Yann L on August 26, 2002 6:29:37 PM]

Share this post


Link to post
Share on other sites
yes that function:

i was using (1000000, 0,0,1) . Yes my drivers are new.

[edit]32 MB on the card[/edit]

[edited by - SporadicFire on August 26, 2002 6:40:00 PM]

Share this post


Link to post
Share on other sites
Hmm, 1MB of VRAM should not be a problem. That''s weird, I''m not aware of any VAR related problems on the GF2MX.

Calling it with (1000000, 0, 0, 0.5f) for AGP memory works ?

Also, be sure to put the allocator call at the very beginning of your app, just after getting a valid OGL context. Although the command itself does not need a valid context, it will be required to allocate VRAM on the 3D card. But alloc your VRAM before loading any textures, that''s important. You don''t need to directly define the VAR, just get the memory.

/ Yann

Share this post


Link to post
Share on other sites
Thanks for the help so far . I got the VRAM allocation working by loading textures after allocating VRAM. Fps gain isnt trumendous though (atleast on my system). But then fill rate is probably my problem. any advice will be appreciated. Do you think texture compression is a good idea?

SporadicFire.

Share this post


Link to post
Share on other sites
I you aren''t geometry limited, then the performance gain won''t be very high (esp. on < GF3 cards).

quote:

But then fill rate is probably my problem. any advice will be appreciated. Do you think texture compression is a good idea?


Yep, it is. The smaller the memory footprint of the textures, the faster the access, and the higher the fillrate. An easy way to try it out, is to set the internal format to one of the s3tc/dxtc formats. You should get a speedup from that.

If you are fillrate limited, you should also try to avoid overdraw. Perhaps look into occlusion culling techniques.

/ Yann

Share this post


Link to post
Share on other sites
Thanks again .

Already looking into occlusion culling techniques.. any good techniques that you know for outdoor environments? I''ll try out the texture compression and see what happens.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!