Paging Texture - Useful or not?

These questions might not have anything to do with opengl.

I’m currently studying whether texture paging is a good idea to be implemented in an terrain rendering application.

My questions are:

  1. If a PC has enough pc memory to store all the textures for the terrain, does using paging increase the frame rates?

  2. How does the GPU decide what textures to be placed in the GPU memory?

Originally posted by dilectio:
[b]These questions might not have anything to do with opengl.

I’m currently studying whether texture paging is a good idea to be implemented in an terrain rendering application.

My questions are:

  1. If a PC has enough pc memory to store all the textures for the terrain, does using paging increase the frame rates?
  1. How does the GPU decide what textures to be placed in the GPU memory? [/b]
  1. What are you talking about?

  2. Every texture is assigned a priority. The textures that dont get used often are removed from video memory when there isnt enough of it. With AGP, they get moved to AGP memory. With PCI, the driver needs to reserve memory and download from the card. That’s texture swapping the details of which are hardware specific and left to the driver implementor.

All YOU can do is hint at the priority of your textures with GL, nothing more.

V-man

www.vterrain.org (lots of info there)

is paging necessary?
perhaps using texture compression (will reduce the texture memory by 1/4 (though at a loss of quality)) also perhaps use a lowerquality internal format (though not always obeyed)

if u are doing something like i am in my freetime which is im writing a program that allows u to walk over a ‘infinite area’ of norepeating landscape u will need to page (which is pretty straightforward) though im generating the textures realtime perhaps u will just read them of a disk?
nyways vterrain has got better info than i can write

V-man, sorry for not making my first question clear to you. What I mean is that if i have a program which uses huge amount of RAM (for textures), say 500mb. If i have more amount of RAM in my pc, will there be any advantages of managing textures using glGenTextures and glDeleteTextures or other texture paging tecnique?

I’m wondering how games like NOLF2 manages the textures. Does it generates terrain textures realtime? I notice that the terrain is very detailed when you zoom to the ground.

i havent seen the game so i dont know what technique they use but often in games the following is used.

a base texture containing the colors is used this is typically a big texture eg 1024x1024 but covering a large area. now when u get up close to the ground u see ‘detail textures’ which are normally tiled textures perhaps 256x256 but drawn to a way smaller area than the base texture.
this gives the impression that youre using way more texture memory then u are.
detail are usually greyscale but can also be color. best to draw them multitexture or if thats not available draw them with an extra pass (fade them out with distance from the camera)

Originally posted by dilectio:
V-man, sorry for not making my first question clear to you. What I mean is that if i have a program which uses huge amount of RAM (for textures), say 500mb. If i have more amount of RAM in my pc, will there be any advantages of managing textures using glGenTextures and glDeleteTextures or other texture paging tecnique?

If you have massive quantity of textures, and not of all of them will show up on screen, and you don’t have enough AGP memory, then it would be better to manage the textures yourself. I suggest that you figure out what textures use identical dimensions and perhaps even internal format, and upload with glTexImageXD instead of glDeleteTextures and then recreating the texture (reallocation by hardware will be slow).

V-man