[Q] Where is the loaded texture data stored ??

After loading texture, (or give an id to texture data…)

where is that rgb data of loaded texture stored ?

in the memory of graphic device, or system memory ?

As far as I know its up to your driver. That is, you can’t know and you cannot control it. I believe you can give the implementation hints as to which textures are more important, but the driver makes the final call

So, It depends on graphic device driver… ( Am I right ?)

yup, for general texture usage, it’s up to the drivers. you can provide suggestions to the driver with the glPrioritizeTextures() function.

according to the red book, you can determine if a texture is resident on the graphics card (stored in the texture cache) with the glGetTexParameter*v() or the glAreTexturesResident() functions.

Thanks for your help .

FYI:

If you are on a Silicon Graphics O2 textures are stored in normal memory.

So the amount of textures you can have resident depends on the amount of main memory you have available.

e.g. I have a realtime application whereby
40 Mb of textures are pre-loaded.

Rob.

Correct me if I’m wrong, but the data is ALWAYS stored in system memory and it is sometimes transferred to the video memory. This is done transparently by OpenGL with texture objects. In any case, you have to keep the texture in system memory, because that is where OpenGl gets it from if it has been bumped out of video memory.

Hi, I believe the sequence would go something like this.

  1. You load (or create) image data into main memory.

  2. You then use OpenGL calls to create a texture using this data.

  3. You free the data you loaded (usually)

  4. You bind the texture to GL objects (i.e. the same texture can be applied to many objects if required)

  5. Where the actual “texture” is held depends on your OpenGL implementation (or “driver”).

    In many cases the texture IS stored in memory on the graphics card.

    On the SGI O2, texture memory is allocated from main memory - no “special” video memory etc to worry about. So you don’t need to ask the questions like, “how many textures can I preload onto my graphics card” etc … if you run out of texture memory, add more memory to your system!

    Similarly, you allocate video buffers, audio buffers and so on, ALSO in main memory. A different beast from a PC.

Rob.