Sign in to follow this  
Funkymunky

Paging in large texture data

Recommended Posts

Funkymunky    1413
How is this generally done, for things like clipmapping or geo-clipmapping? Do I keep a file pointer open with random access, or do I open and close the file regularly?

For example, with geo-clipmapping, you do these toroidal updates to your clipmap windows. In order to render the clipmap updates, I would need a texture that has the paged-in data (to source from when rendering the clipmaps). Do I keep a file pointer open the entire time, of the full size texture file (the giant heightmap), and then call glTexSubImage2D when I need to update my texture that I use to render the clipmaps with?

Share this post


Link to post
Share on other sites
Ohforf sake    2052
Why would you want to close it?

I keep it open. Opening/closing the file only increases the number of system calls and might constantly flush/refill some internal buffers.

I think Carmack even disabled the io buffers altogether for his SVTs so that he only reads what he really needs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this